Issues in mutation-summary

108 views
Skip to first unread message

Ziyuan Yao

unread,
Apr 27, 2012, 9:27:14 PM4/27/12
to mutation-sum...@googlegroups.com
I just developed a Chrome extension that makes use of mutation-summary:

I encountered this issue during the development: Nodes found by a characterData query may not be text nodes. They can be comment nodes, or their parent nodes can be <style> and <script>.

Maybe this is by design. document.CreateTreeWalker() also has similar behaviors.

Rafael Weinstein

unread,
Apr 27, 2012, 9:42:17 PM4/27/12
to mutation-sum...@googlegroups.com
Glad to hear you're using it!

So, yes, characterData query will return all types of characterData
nodes, which may (as you point out) be children of style or script.

I suppose we could add API to the query so specify what *type* of
characterData node, but the MutationSummary still has to listen for
all types and it would just do the same simple filter that you're
likely already doing.
> --
> You received this message because you are subscribed to the Google Groups
> "mutation-summary-discuss" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/mutation-summary-discuss/-/mO2LJmTPFAcJ.
> To post to this group, send email to
> mutation-sum...@googlegroups.com.
> To unsubscribe from this group, send email to
> mutation-summary-d...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/mutation-summary-discuss?hl=en.
Reply all
Reply to author
Forward
0 new messages