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

Function disableScript

2.1.1/src/manipulation.js:61–64  ·  view source on GitHub ↗
( elem )

Source from the content-addressed store, hash-verified

59
60// Replace/restore the type attribute of script elements for safe DOM manipulation
61function disableScript( elem ) {
62 elem.type = (elem.getAttribute("type") !== null) + "/" + elem.type;
63 return elem;
64}
65function restoreScript( elem ) {
66 var match = rscriptTypeMasked.exec( elem.type );
67

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected