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

Function isHTMLMediaElement

src/utils/event-helper.js:245–247  ·  view source on GitHub ↗

* Returns true if the parameter is a HTMLMediaElement. * @param {!Element|!Window} eleOrWindow * @return {boolean}

(eleOrWindow)

Source from the content-addressed store, hash-verified

243 * @return {boolean}
244 */
245function isHTMLMediaElement(eleOrWindow) {
246 return eleOrWindow.tagName === 'AUDIO' || eleOrWindow.tagName === 'VIDEO';
247}
248
249/**
250 * Returns true if this error message is was created for a load error.

Callers 3

isLoadedFunction · 0.85
loadPromiseFunction · 0.85
failedToLoadFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected