Skip to content

Mutation observer project

Josh Matthews edited this page Feb 15, 2017 · 3 revisions

Implement MutationObserver API

Background information: The DOM standard defines a MutationObserver API that allows web content to receive callbacks when the page contents are mutated. The goal of this work is to implement the fundamental pieces required to support this API.

Tracking issue: https://github.com/servo/servo/issues/6633 (please ask questions here)

Initial steps:

  • email the mozilla.dev.servo mailing list (be sure to subscribe to it first!) introducing your group and asking any necessary questions
  • create the MutationObserver and MutationRecord interfaces with stub method implementations
    • hide the new interfaces by default by adding a [Pref="dom.mutation_observer.enabled"] attribute to each one and add a corresponding preference to resources/prefs.json
  • add a __dir__.ini file to tests/wpt/metadata/dom/nodes/ which enables the new preference, then run the tests in that directory and update the expected test results.
  • add a vector of MutationObserver objects as a member of ScriptThread
  • implement the MutationObserver constructor

Subsequent steps:

Clone this wiki locally