export default class Page { xpathDocText : string ; xpathNodeText : string ; static readonly disabledProtocols = new RegExp ( '(^chrome:|^about:|^[a-zA-Z]+-extension:)' , 'i' ) ; static readonly forbiddenNodeRegExp = new RegExp ( '^\s*(<[a-z].+?\/?>|{.+?:.+?;.*}|https?:\/\/[^\s]+$)' ) ; static readonly forbiddenTags = [ 'SCRIPT' , 'STYLE' , 'INPUT' , 'TEXTAREA' , 'IFRAME' , 'LINK' ] ; static isForbiddenNode ( node ) { if ( node . isContentEditable ) { return true ; } if ( node . parentNode && ( node . parentNode . isContentEditable || Page . forbiddenTags . includes ( node . parentNode . nodeName ) ) ) { return true ; } return Page . forbiddenTags . includes ( node . nodeName ) ; } }