MCPcopy Create free account
hub / github.com/ChromeDevTools/devtools-frontend / callback

Function callback

front_end/devtools_compatibility.js:1230–1244  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1228 const {prototype, extends: localName} = options;
1229 const document = this;
1230 const callback = function() {
1231 const element = document.createElement(localName || typeExtension);
1232 const skip = new Set(['constructor', '__proto__']);
1233 for (const key of Object.keys(Object.getOwnPropertyDescriptors(prototype.__proto__ || {}))) {
1234 if (skip.has(key)) {
1235 continue;
1236 }
1237 element[key] = prototype[key];
1238 }
1239 element.setAttribute('is', typeExtension);
1240 if (element['createdCallback']) {
1241 element['createdCallback']();
1242 }
1243 return element;
1244 };
1245 fakeRegistry.set(typeExtension, callback);
1246 return callback;
1247 };

Callers 2

embedderMessageAckMethod · 0.70
getHostConfigMethod · 0.70

Calls 4

createElementMethod · 0.45
keysMethod · 0.45
hasMethod · 0.45
setAttributeMethod · 0.45

Tested by

no test coverage detected