MCPcopy Create free account
hub / github.com/OpenIntroStat/ims / disableScript

Function disableScript

libs/jquery-3.5.1/jquery-2.2.4.js:5148–5151  ·  view source on GitHub ↗
( elem )

Source from the content-addressed store, hash-verified

5146
5147// Replace/restore the type attribute of script elements for safe DOM manipulation
5148function disableScript( elem ) {
5149 elem.type = ( elem.getAttribute( "type" ) !== null ) + "/" + elem.type;
5150 return elem;
5151}
5152function restoreScript( elem ) {
5153 var match = rscriptTypeMasked.exec( elem.type );
5154

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected