protected function isScripted( $html ) {

		if ( preg_match( '/<script[^>]*>.*?<\/script>/is', $html ) ) {
			return true;
		}

		try {
			$html5 = new HtmlParser( true );
			$doc = $html5->loadHTML( $html );
			foreach ( $doc->getElementsByTagname( '*' ) as $element ) {
				foreach ( iterator_to_array( $element->attributes ) as $name => $attribute ) {
					if ( in_array( $name, $this->javaScriptEvents, true ) ) {
						return true;
					}
				}
			}
		} catch ( \Exception $e ) {
			debug_error_log( $e );
		}

		return false;
	}