Mozilla's getting a new look. What do you think? https://mzl.la/brandsurvey

HTMLIFrameElement.addNextPaintListener()

Non-standard
This feature is not on a current W3C standards track, but it is supported on the Firefox OS platform. Although implementations may change in the future and it is not supported widely across browsers, it is suitable for use in code dedicated to Firefox OS apps.

This API is available on Firefox OS for privileged or certified applications only.

The addNextPaintListener() method of the HTMLIFrameElement is used to define a handler to listen for the next MozAfterPaint event coming from the browser <iframe>.

This event provides information about what has been repainted. It is mainly used to investigate performance optimization.

Note: The handler will receive the event once and then be thrown away.

Syntax

instanceOfHTMLIframeElement.addNextPaintListener(listener);

Returns

Void.

Parameters

listener
A function handler to listen for a MozAfterPaint event.

Examples

var browser = document.querySelector('iframe');

function onNextPaint() {
  console.log("Paint has occured");
}

browser.addNextPaintListener(onNextPaint);

Specification

Not part of any specification.

Browser compatibility

Feature Chrome Firefox (Gecko) Internet Explorer Opera Safari (WebKit)
Basic support Not supported Not supported Not supported Not supported Not supported
Feature Android Firefox Mobile (Gecko) Firefox OS (Gecko) IE Phone Opera Mobile Safari Mobile
Basic support Not supported Not supported 1.0.1 Not supported Not supported Not supported

Note: Use of the Browser API requires a privileged app, and browser and/or embed-apps permissions, depending on what you want to do. See Using the Browser API for more details.

See also

Document Tags and Contributors

 Contributors to this page: chrisdavidmills, teoli, ajaybhat, kscarfone, Jeremie
 Last updated by: chrisdavidmills,