MCPcopy Create free account
hub / github.com/ampproject/amphtml / adoptedCallback

Method adoptedCallback

src/custom-element.js:104–110  ·  view source on GitHub ↗

* adoptedCallback is only called when using a Native implementation of Custom Elements V1. * Our polyfill does not call this method.

()

Source from the content-addressed store, hash-verified

102 * Our polyfill does not call this method.
103 */
104 adoptedCallback() {
105 // Work around an issue with Firefox changing the prototype of our
106 // already constructed element to the new document's HTMLElement.
107 if (Object.getPrototypeOf(this) !== customAmpElementProto) {
108 Object.setPrototypeOf(this, customAmpElementProto);
109 }
110 }
111 }
112 const customAmpElementProto = CustomAmpElement.prototype;
113 return /** @type {typeof AmpElement} */ (CustomAmpElement);

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected