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

Function userAssertElement

src/core/assert/user.js:67–73  ·  view source on GitHub ↗
(shouldBeElement, opt_message)

Source from the content-addressed store, hash-verified

65 * @throws {Error} when shouldBeElement is not an Element
66 */
67export function userAssertElement(shouldBeElement, opt_message) {
68 return assertions.assertElement(
69 /** @type {import('./base').AssertionFunctionDef} */ (userAssert),
70 shouldBeElement,
71 opt_message
72 );
73}
74
75/**
76 * Throws an error if the first argument isn't a string. The string can

Callers

nothing calls this directly

Calls 1

assertElementMethod · 0.80

Tested by

no test coverage detected