Closed
Bug 698061
Opened 13 years ago
Closed 13 years ago
document.importNode should comply with optional argument omitted
Categories
(Core :: DOM: Core & HTML, defect)
Core
DOM: Core & HTML
Tracking
()
RESOLVED
FIXED
mozilla10
People
(Reporter: raynos2, Assigned: smaug)
References
Details
(Keywords: dev-doc-complete)
Attachments
(1 file)
7.38 KB,
patch
|
sicking
:
review+
|
Details | Diff | Splinter Review |
User Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/535.2 (KHTML, like Gecko) Chrome/15.0.874.106 Safari/535.2
Steps to reproduce:
document.importNode(someElement); (FF7)
Actual results:
Error not enough arguments
Expected results:
It should have made the second argument (deep Clone) optional as defined in DOM4
http://www.w3.org/TR/domcore/#dom-document-importnode
Component: General → DOM: Core & HTML
Product: Firefox → Core
QA Contact: general → general
Version: 7 Branch → Trunk
Assignee | ||
Updated•13 years ago
|
Assignee: nobody → Olli.Pettay
Assignee | ||
Updated•13 years ago
|
Status: UNCONFIRMED → ASSIGNED
Ever confirmed: true
Assignee | ||
Comment 1•13 years ago
|
||
I think the backwards incompatible behavior of DOM4 is ok.
Assignee | ||
Comment 2•13 years ago
|
||
...patch coming.
Assignee | ||
Comment 3•13 years ago
|
||
(In reply to Jake Verbaten from comment #0)
> http://www.w3.org/TR/domcore/#dom-document-importnode
Btw, please don't use old versions of specs.
http://dvcs.w3.org/hg/domcore/raw-file/tip/Overview.html is better.
Keywords: dev-doc-needed
OS: Windows 7 → All
Hardware: x86_64 → All
Summary: document.importNode doesn't comply with optional arguments → document.importNode should comply with optional argument omitted
Reporter | ||
Comment 4•13 years ago
|
||
Thank you for pointing out there is Editors draft!
Assignee | ||
Comment 5•13 years ago
|
||
Chrome handles the optional parameter in a wrong way. It defaults to false, but the spec
defaults to true (which is IMO the most obvious thing to do in this case).
Assignee | ||
Updated•13 years ago
|
See Also: → https://bugs.webkit.org/show_bug.cgi?id=71190
Assignee | ||
Comment 6•13 years ago
|
||
Attachment #570566 -
Flags: review?(jonas)
Comment on attachment 570566 [details] [diff] [review]
patch
r=me
There's actually lot's of arguments that have been marked as optional in DOM4. We should go through and fix them all. I'll file a separate bug for that.
Attachment #570566 -
Flags: review?(jonas) → review+
Assignee | ||
Comment 8•13 years ago
|
||
Need to be careful with the default value of the optional parameters.
Also, need to review each case. DOM4, as any other spec, contains random insanity :)
Assignee | ||
Comment 9•13 years ago
|
||
Status: ASSIGNED → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
Comment 10•13 years ago
|
||
Documented this change in https://developer.mozilla.org/en/DOM/document.importNode#section_2
Updated•13 years ago
|
Keywords: dev-doc-needed → dev-doc-complete
You need to log in
before you can comment on or make changes to this bug.
Description
•