Warning: Removed in Firefox 65.
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
MozAfterPaintevent.
Examples
var browser = document.querySelector('iframe'); function onNextPaint() { console.log("Paint has occured"); } browser.addNextPaintListener(onNextPaint);
Specification
Not part of any specification.
Browser compatibility
Supported since Firefox 47, in chrome code only. Removed completely in Firefox 65.
Unlikely ever to be supported in other browsers.
