MCPcopy
hub / github.com/ampproject/amphtml / devAssertElement

Function devAssertElement

src/core/assert/dev.js:84–95  ·  view source on GitHub ↗
(shouldBeElement, opt_message)

Source from the content-addressed store, hash-verified

82 * @throws {Error} when shouldBeElement is not an Element
83 */
84export function devAssertElement(shouldBeElement, opt_message) {
85 if (mode.isMinified()) {
86 return /** @type {void} */ (shouldBeElement);
87 }
88 devAssertDceCheck();
89
90 return assertions.assertElement(
91 /** @type {import('./base').AssertionFunctionDef} */ (devAssert),
92 shouldBeElement,
93 opt_message
94 );
95}
96
97/**
98 * Throws an error if the first argument isn't a string. The string can

Callers 14

delegateAutoplayFunction · 0.90
onChunkMethod · 0.90
transferBodyMethod · 0.90
transferBodyChunk_Method · 0.90
applyStaticLayoutFunction · 0.90
isInternalOrServiceNodeFunction · 0.90
handleCopy_Method · 0.90
resetStoryStyles_Method · 0.90
drag_Method · 0.90
uponSanitizeElementMethod · 0.90

Calls 2

devAssertDceCheckFunction · 0.85
assertElementMethod · 0.80

Tested by

no test coverage detected