MCPcopy Create free account
hub / github.com/TruthHun/BookStack / disableScript

Function disableScript

static/wangEditor/js/lib/jquery-2.2.1.js:5142–5145  ·  view source on GitHub ↗
( elem )

Source from the content-addressed store, hash-verified

5140
5141// Replace/restore the type attribute of script elements for safe DOM manipulation
5142function disableScript( elem ) {
5143 elem.type = ( elem.getAttribute( "type" ) !== null ) + "/" + elem.type;
5144 return elem;
5145}
5146function restoreScript( elem ) {
5147 var match = rscriptTypeMasked.exec( elem.type );
5148

Callers

nothing calls this directly

Calls 1

getAttributeMethod · 0.80

Tested by

no test coverage detected