MDN self-hosted library · e01.org

devtools.inspectedWindow.onResourceContentCommitted

Fired when a revision of the resource is committed. For example, user saves an edited version of the resource in the Developer Tools.

no runnable cells webextension-api-event upstream source

Fired when a revision of the resource is committed. For example, user saves an edited version of the resource in the Developer Tools.

Syntax

browser.devtools.inspectedWindow.onResourceContentCommitted.addListener(listener)
browser.devtools.inspectedWindow.onResourceContentCommitted.removeListener(listener)
browser.devtools.inspectedWindow.onResourceContentCommitted.hasListener(listener)

Events have three functions:

  • addListener(listener)
  • : Adds a listener to this event.
  • removeListener(listener)
  • : Stop listening to this event. The listener argument is the listener to remove.
  • hasListener(listener)
  • : Check whether listener is registered for this event. Returns true if it is listening, false otherwise.

addListener syntax

Parameters

  • listener

  • : The function called when this event occurs. The function is passed this argument:

    • resource
    • : devtools.inspectedWindow.Resource. The resource that was committed.
    • content
    • : string The new content of the resource.

h2

Browser compatibility