Unify HTML and XHTML iframe naming
Categories
(Core :: DOM: Core & HTML, defect, P5)
Tracking
()
People
(Reporter: hsivonen, Unassigned)
References
(Blocks 1 open bug)
Details
(Keywords: html5)
nsFrameLoader picks the iframe name from the name attribute in HTML and the id attribute in XHTML. The behavior between HTML and XHTML should be unified. HTML5 required both name and id to be considered, which doesn't quite fit the current Gecko expectations: http://www.whatwg.org/specs/web-apps/current-work/#named-access-on-the-window-object
Reporter | ||
Comment 1•15 years ago
|
||
Remember to test document['foo'], window['foo'] and target='foo'.
Comment 3•14 years ago
|
||
a target - iframe name, problem application/xhtml+xml testcase: http://host0001.webd.pl/bugs/firefox/target.php http://dev.w3.org/html5/markup/a.html "target = browsing-context name" http://dev.w3.org/html5/markup/iframe.html "name = browsing-context name" HTML5 + XML = XHTML5 http://en.wikipedia.org/wiki/HTML5 "XHTML5 is the XML serialization of HTML5. XML documents must be served with an XML Internet media type such as application/xhtml+xml or application/xml. XHTML5 requires XML’s strict, well-formed syntax. In XHTML5 the HTML5 doctype html is optional and may simply be omitted."
![]() |
||
Comment 4•13 years ago
|
||
The frameloader sets the browser context name. The section linked to in comment 0 does NOT use browser context names. The text about setting the browser context name is at http://www.whatwg.org/specs/web-apps/current-work/multipage/the-iframe-element.html#attr-iframe-name and only looks at the 'name' attribute.
Comment 5•13 years ago
|
||
>> and only looks at the 'name' attribute Unfortunately target -> name do not works in FF 7! Try this: http://host0001.webd.pl/bugs/firefox/target.php
Comment 6•6 years ago
|
||
https://bugzilla.mozilla.org/show_bug.cgi?id=1472046 Move all DOM bugs that haven’t been updated in more than 3 years and has no one currently assigned to P5. If you have questions, please contact :mdaly.
Comment 7•4 years ago
|
||
Current spec texts:
-
Setting the name of a
iframe
browsing context: https://html.spec.whatwg.org/multipage/iframe-embed-object.html#attr-iframe-name -
The rules for choosing a browsing context (see step 7): https://html.spec.whatwg.org/multipage/browsers.html#the-rules-for-choosing-a-browsing-context-given-a-browsing-context-name
Clearly only name
should be considered. Having id
, and not name
, be used instead for XHTML documents produces confusing behaviour for authors which is difficult to debug (since the behaviour is dependent on the MIME type of the file).
I get that this is a very old issue, but Webkit/Blink provide expected (spec) behaviour, and having websites break only in Firefox and only when the MIME type is application/xhtml+xml
seems like the sort of thing which deserves a fix :P .
Updated•2 years ago
|
Description
•