Make NodeIterator.detach() a no-op

RESOLVED FIXED in mozilla22

Status

()

Core
DOM: Core & HTML
RESOLVED FIXED
5 years ago
4 years ago

People

(Reporter: annevk, Assigned: Ms2ger)

Tracking

({dev-doc-complete, site-compat})

unspecified
mozilla22
x86
Mac OS X
dev-doc-complete, site-compat
Points:
---
Bug Flags:
in-testsuite +

Firefox Tracking Flags

(Not tracked)

Details

(URL)

Attachments

(1 attachment)

(Reporter)

Description

5 years ago
Just as we did with Range.detach(), NodeIterator.detach() should do nothing. (Removing it altogether seems unwise.)
Keywords: dev-doc-needed
(Assignee)

Updated

5 years ago
Status: NEW → ASSIGNED
(Assignee)

Comment 1

5 years ago
Created attachment 704324 [details] [diff] [review]
Patch v1
Attachment #704324 - Flags: review?(jonas)
Attachment #704324 - Flags: review?(jonas) → review?(mounir)
Comment on attachment 704324 [details] [diff] [review]
Patch v1

Review of attachment 704324 [details] [diff] [review]:
-----------------------------------------------------------------

r=me, with the error being reported to the console. Feel free to open a follow-up to address the comment but please address it :)

::: content/base/src/nsNodeIterator.cpp
@@ +266,1 @@
>      return NS_OK;

Should we add a message in the console saying that this method doesn't do anything any more?

By the way, why doesn't the spec call the method deprecated?

::: content/base/test/test_NodeIterator_basics_filters.xhtml
@@ +121,5 @@
>        iterator.nextNode();
>      try {
>        iterator[method]();
> +      ok(true, "Able to call " + method + " on a detached NodeIterator");
> +    } catch (x) { ok(false, x) }

A comment saying that the node isn't really detached would be nice.
Attachment #704324 - Flags: review?(mounir) → review+
(Assignee)

Comment 3

4 years ago
https://hg.mozilla.org/mozilla-central/rev/4854f48986eb
Status: ASSIGNED → RESOLVED
Last Resolved: 4 years ago
Flags: in-testsuite+
Resolution: --- → FIXED
Target Milestone: --- → mozilla22
I've added this bug to the compatibility doc. Please correct the info if wrong.
https://developer.mozilla.org/en-US/docs/Site_Compatibility_for_Firefox_22

Also, please update the following docs:
https://developer.mozilla.org/en-US/docs/DOM/NodeIterator.detach
(Assignee)

Comment 5

4 years ago
https://developer.mozilla.org/en-US/docs/DOM/NodeIterator.detach too
Component: DOM: Traversal-Range → DOM: Core & HTML
Product: Core → Core

Updated

4 years ago
Keywords: site-compat
https://developer.mozilla.org/en-US/docs/DOM/NodeIterator.detach done
Keywords: dev-doc-needed → dev-doc-complete
You need to log in before you can comment on or make changes to this bug.