MCPcopy Create free account
hub / github.com/tree-sitter/tree-sitter-javascript / disableScript

Function disableScript

examples/jquery.js:4930–4933  ·  view source on GitHub ↗
( elem )

Source from the content-addressed store, hash-verified

4928
4929// Replace/restore the type attribute of script elements for safe DOM manipulation
4930function disableScript( elem ) {
4931 elem.type = (elem.getAttribute("type") !== null) + "/" + elem.type;
4932 return elem;
4933}
4934function restoreScript( elem ) {
4935 var match = rscriptTypeMasked.exec( elem.type );
4936

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…