Missed the action at the 2018 Chrome Dev Summit? Catch up with our playlist on the Google Chrome Developers channel on YouTube. Watch now.

Avoids Mutation Events In Its Own Scripts

Overview

The following mutation events harm performance and are deprecated in the DOM events spec:

  • DOMAttrModified
  • DOMAttributeNameChanged
  • DOMCharacterDataModified
  • DOMElementNameChanged
  • DOMNodeInserted
  • DOMNodeInsertedIntoDocument
  • DOMNodeRemoved
  • DOMNodeRemovedFromDocument
  • DOMSubtreeModified

Recommendations

Under URLs, Lighthouse reports each mutation event listener that it found in your code. Replace each of these mutation events with a MutationObserver. See MutationObserver on MDN for more help.

More information

Lighthouse collects all of the event listeners on the page, and flags any listener that uses one of the types listed above.

Feedback

Was this page helpful?