mirror of
https://github.com/zoriya/v10.git
synced 2026-08-16 02:45:09 +00:00
20 lines
621 B
JavaScript
20 lines
621 B
JavaScript
//#region src/dom/predicates.ts
|
|
function isDocument(value) {
|
|
return value instanceof Node && value.nodeType === 9;
|
|
}
|
|
function isShadowRoot(value) {
|
|
return value instanceof Node && value.nodeType === 11 && "host" in value;
|
|
}
|
|
function isHTMLVideoElement(value) {
|
|
return value instanceof HTMLVideoElement;
|
|
}
|
|
function isHTMLAudioElement(value) {
|
|
return value instanceof HTMLAudioElement;
|
|
}
|
|
function isHTMLMediaElement(value) {
|
|
return value instanceof HTMLMediaElement;
|
|
}
|
|
//#endregion
|
|
export { isDocument, isHTMLAudioElement, isHTMLMediaElement, isHTMLVideoElement, isShadowRoot };
|
|
|
|
//# sourceMappingURL=predicates.js.map
|