Previous sibling(s) of a removed node

40 views
Skip to first unread message

Paul Butcher

unread,
May 6, 2014, 12:56:32 PM5/6/14
to mutation-sum...@googlegroups.com
Is there any way to retrieve the previous sibling(s) of a removed node?

I notice that there’s a comment on the API Reference page from January asking the same question, so clearly I’m not the only one would would find this functionality helpful :-)

Is this something that can be done with mutation-summary as it stands? If not, any idea how easy it would be to provide this as an enhancement?

Thanks in advance,

--
paul.butcher->msgCount++

Silverstone, Brands Hatch, Donington Park...
Who says I have a one track mind?

http://www.paulbutcher.com/
LinkedIn: http://www.linkedin.com/in/paulbutcher
Skype: paulrabutcher

Author of Seven Concurrency Models in Seven Weeks: When Threads Unravel

Rafael Weinstein

unread,
May 6, 2014, 2:48:22 PM5/6/14
to mutation-sum...@googlegroups.com
Yes. See the 'oldPreviousSibling' option on the API reference page:



--
You received this message because you are subscribed to the Google Groups "mutation-summary-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mutation-summary-d...@googlegroups.com.
To post to this group, send email to mutation-sum...@googlegroups.com.
Visit this group at http://groups.google.com/group/mutation-summary-discuss.
For more options, visit https://groups.google.com/d/optout.

Paul Butcher

unread,
May 6, 2014, 3:04:26 PM5/6/14
to mutation-sum...@googlegroups.com, mutation-sum...@googlegroups.com
Yeah, I saw that, but the documentation says:

  • getOldPreviousSibling. a function which will retrieve the previous previousSibling for nodenode must be contained in the reordered element array, otherwise the function throws an error.

I'm interested in deleted, not reordered nodes. Is the documentation incorrect?

Sent from Mailbox

Rafael Weinstein

unread,
May 6, 2014, 3:08:03 PM5/6/14
to mutation-sum...@googlegroups.com
The doc says that it works with nodes in *removed* and reordered.

Paul Butcher

unread,
May 6, 2014, 5:33:34 PM5/6/14
to mutation-sum...@googlegroups.com
Ah! I’ve just worked out that you’re talking about the MutationSummary parameter, not the element of an all request response.

Is there a substantive difference between the two? Any reason why the former returns results for both reordered and deleted elements and the latter only for reordered elements? Or is the documentation for the latter incorrect, and it does support both deleted and reordered elements?

Thanks - I’ll experiment with this tomorrow.

--
paul.butcher->msgCount++

Silverstone, Brands Hatch, Donington Park...
Who says I have a one track mind?

http://www.paulbutcher.com/
LinkedIn: http://www.linkedin.com/in/paulbutcher
Skype: paulrabutcher

Author of Seven Concurrency Models in Seven Weeks: When Threads Unravel

Reply all
Reply to author
Forward
0 new messages