This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 24653 - Planning on changing mutation hooks
Summary: Planning on changing mutation hooks
Status: RESOLVED FIXED
Alias: None
Product: WHATWG
Classification: Unclassified
Component: HTML (show other bugs)
Version: unspecified
Hardware: PC All
: P2 normal
Target Milestone: Unsorted
Assignee: Ian 'Hixie' Hickson
QA Contact: contributor
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 23268
  Show dependency treegraph
 
Reported: 2014-02-13 12:30 UTC by Anne
Modified: 2014-09-12 18:23 UTC (History)
3 users (show)

See Also:


Attachments

Description Anne 2014-02-13 12:30:58 UTC
HTML loosely uses "nodes are inserted" and "nodes are removed" for two elements or so and does not even bother with attribute callbacks.

I'm planning on slightly revamping them in order to fix a bug in NodeIterator.

Is there a way I can write them that will make you use these callbacks throughout HTML?

For the removed callback I plan to provide /removedNode/, /oldParent/, /oldPreviousSibling/ as arguments.

For the inserted callback only /insertedNode/ seems needed.

Similar for attribute changes on an element.


However, I suspect that over time there may be more churn coming to these callbacks due to custom elements and how we envision everything to evolve. So this bug is both a question whether you mind if I change the current callbacks to suit my needs and what your thoughts on the matter are.
Comment 1 Ian 'Hixie' Hickson 2014-02-14 21:52:25 UTC
I don't have any particular thoughts. If there's cases where the HTML spec is too loose about something Web-detectable, I'm happy to tighten it up. I'm in no rush to do it if it's going to churn.
Comment 2 Ian 'Hixie' Hickson 2014-02-24 22:12:46 UTC
Do you need anything else from me here?
Comment 3 Anne 2014-08-14 14:56:36 UTC
The hooks are now named "insertion steps" and "removing steps" to be consistent with "cloning steps" and "adopting steps". Sorry for the churn, will try to keep these as is. They are also passed arguments now that can be used.
Comment 4 contributor 2014-09-12 18:23:21 UTC
Checked in as WHATWG revision r8769.
Check-in comment: Integrate with DOM for 'removing steps' and 'insertion steps'.
http://html5.org/tools/web-apps-tracker?from=8768&to=8769