openreplay/frontend/app/player/guards.ts
Delirium a24d99f75c
feat(player): player file loader refactoring (#1203)
* change(ui): refactor mob loading

* refactor(player): split message loader into separate file, remove toast dependency out of player lib, fix types, fix inspector and screen context

* refactor(player): simplify file loading, add safe error throws

* refactor(player): move loading status changers to the end of the flow
2023-05-12 15:38:43 +02:00

3 lines
No EOL
134 B
TypeScript

export function isRootNode(node: Node): node is Document {
return node.nodeType === Node.DOCUMENT_NODE || node instanceof Document
}