Closed
Bug 236994
Opened 20 years ago
Closed 20 years ago
xbl script element does nothing
Categories
(Core :: XBL, defect)
Tracking
()
People
(Reporter: eug957k02, Assigned: hyatt)
Details
User-Agent: Mozilla/4.0 (compatible; MSIE 5.0; Windows 2000) Opera 6.05 [en] Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.6) Gecko/20040206 Firefox/0.8 Regardless of position in an xbl document, and regardless of whether script is defined inline or by relative URL, functions declared in the script element cannot be called. Reproducible: Always Steps to Reproduce: 1.create an xbl document 2.add the following code anywhere in the document. <script id="myScript" type="text/javascript"> <![CDATA[ alert("The Script has been found"); function doStuff() { alert("stuff done"); } ]]> </script> 3. in the constructor for a binding in that document, add the line: doStuff(); 4. attach the binding to an element in the browser Actual Results: an error message appears: ReferenceError: doStuff is not defined Expected Results: the script should have been "evaluated the first time a binding in the XBL file is attached to a bound element in the document". This means that on binding, two alerts should appear, first "The Script has been found", when the binding attaches, then "stuff done" when the binding's constructor is called. see: http://www.mozilla.org/projects/xbl/xbl.html#script
Comment 1•20 years ago
|
||
The spec and what we implement are rather unrelated... (and the spec is in the process of being updated). In any case, this has just not been implemented yet. *** This bug has been marked as a duplicate of 58757 ***
Status: UNCONFIRMED → RESOLVED
Closed: 20 years ago
Resolution: --- → DUPLICATE
You need to log in
before you can comment on or make changes to this bug.
Description
•