MCPcopy Create free account
hub / github.com/frank-lam/fullstack-tutorial / disableScript

Function disableScript

notes/docsify/unpkg/gotop/jquery-2.1.0.js:4884–4887  ·  view source on GitHub ↗
( elem )

Source from the content-addressed store, hash-verified

4882
4883// Replace/restore the type attribute of script elements for safe DOM manipulation
4884function disableScript( elem ) {
4885 elem.type = (elem.getAttribute("type") !== null) + "/" + elem.type;
4886 return elem;
4887}
4888function restoreScript( elem ) {
4889 var match = rscriptTypeMasked.exec( elem.type );
4890

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected