MCPcopy Create free account
hub / github.com/JsAaron/jQuery / disableScript

Function disableScript

2.1.1/test/other.js:2336–2339  ·  view source on GitHub ↗
( elem )

Source from the content-addressed store, hash-verified

2334
2335// Replace/restore the type attribute of script elements for safe DOM manipulation
2336function disableScript( elem ) {
2337 elem.type = (elem.getAttribute("type") !== null) + "/" + elem.type;
2338 return elem;
2339}
2340function restoreScript( elem ) {
2341 var match = rscriptTypeMasked.exec( elem.type );
2342

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected