MCPcopy
hub / github.com/ampproject/worker-dom / createElement

Method createElement

src/worker-thread/dom/Document.ts:118–120  ·  view source on GitHub ↗
(name: string)

Source from the content-addressed store, hash-verified

116 }
117
118 public createElement(name: string): Element {
119 return this.createElementNS(HTML_NAMESPACE, toLower(name));
120 }
121
122 public createElementNS(namespaceURI: NamespaceURI, localName: string): Element {
123 const constructor = NS_NAME_TO_CLASS[`${namespaceURI}:${localName}`] || HTMLElement;

Callers 15

createTestingDocumentFunction · 0.95
benchmark.mjsFile · 0.80
index.tsFile · 0.80
index.amp.tsFile · 0.80
insertCellMethod · 0.80
insertRowMethod · 0.80
styleAdd.test.tsFile · 0.80

Calls 2

createElementNSMethod · 0.95
toLowerFunction · 0.85

Tested by

no test coverage detected