Last Comment Bug 823549 - Make NodeIterator.detach() a no-op
: Make NodeIterator.detach() a no-op
Status: RESOLVED FIXED
: dev-doc-complete, site-compat
Product: Core
Classification: Components
Component: DOM: Core & HTML (show other bugs)
: unspecified
: x86 Mac OS X
: -- normal (vote)
: mozilla22
Assigned To: :Ms2ger (⌚ UTC+1/+2)
:
Mentors:
http://dom.spec.whatwg.org/
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2012-12-20 08:15 PST by Anne (:annevk)
Modified: 2013-08-08 00:55 PDT (History)
5 users (show)
Ms2ger: in‑testsuite+
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
Patch v1 (4.17 KB, patch)
2013-01-20 06:24 PST, :Ms2ger (⌚ UTC+1/+2)
mounir: review+
Details | Diff | Splinter Review

Description Anne (:annevk) 2012-12-20 08:15:14 PST
Just as we did with Range.detach(), NodeIterator.detach() should do nothing. (Removing it altogether seems unwise.)
Comment 1 :Ms2ger (⌚ UTC+1/+2) 2013-01-20 06:24:38 PST
Created attachment 704324 [details] [diff] [review]
Patch v1
Comment 2 Mounir Lamouri (:mounir) 2013-02-10 12:48:16 PST
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.
Comment 3 :Ms2ger (⌚ UTC+1/+2) 2013-03-10 04:16:02 PDT
https://hg.mozilla.org/mozilla-central/rev/4854f48986eb
Comment 4 Kohei Yoshino [:kohei] 2013-03-29 10:18:06 PDT
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
Comment 5 :Ms2ger (⌚ UTC+1/+2) 2013-03-30 06:48:44 PDT
https://developer.mozilla.org/en-US/docs/DOM/NodeIterator.detach too
Comment 6 Jean-Yves Perrier [:teoli] 2013-08-08 00:55:35 PDT
https://developer.mozilla.org/en-US/docs/DOM/NodeIterator.detach done

Note You need to log in before you can comment on or make changes to this bug.