Closed Bug 1483034 Opened 6 years ago Closed 6 years ago

Namespace of script tags in browser.xhtml

Categories

(Firefox :: General, enhancement, P4)

enhancement

Tracking

()

RESOLVED FIXED

People

(Reporter: bdahl, Unassigned)

References

Details

Look into why the XHTML namespaces were needed in bug 1482256.
Taking a stab at a priority to move this out of the triage list. Adjust as necessary.
Priority: -- → P4
The main issue here is in browser.xhtml we create the script tags in the XUL namepsace which doesn't have special handling. In a XUL document the script is loaded by nsXULContentSink as soon as a script tag is encountered[1], but the element itself is just a plain nsXULElement. So when we load browser.xhtml, a plain nsXULElement is created for the script tag, but it is never loaded because the nsXULContentSink is not used. Whereas when we add a XHTML namespace to the script tag, there is special handling for loading the script when that element is closed[2]. [1] https://searchfox.org/mozilla-central/rev/5a18fb5aeeec99f1ca1c36a697082c221189a3b9/dom/xul/nsXULContentSink.cpp#779 [2] https://searchfox.org/mozilla-central/rev/5a18fb5aeeec99f1ca1c36a697082c221189a3b9/dom/xml/nsXMLContentSink.cpp#595
No longer blocks: top-level-html
Depends on: 1533881
Blocks: 1533881
No longer depends on: 1533881

Also, why does <xul:script> use type="application/javascript", but when it was converted to <html:script>, this got changed to type="text/javascript"?

Shouldn’t they both be using type="application/javascript"?

This is no longer an issue after bug 1527977 and bug 1543245.

Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.