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

Function assert

libs/jquery-3.5.1/jquery-3.5.1.js:932–949  ·  view source on GitHub ↗

* Support testing using an element * @param {Function} fn Passed the created element and returns a boolean result

( fn )

Source from the content-addressed store, hash-verified

930 * @param {Function} fn Passed the created element and returns a boolean result
931 */
932function assert( fn ) {
933 var el = document.createElement( "fieldset" );
934
935 try {
936 return !!fn( el );
937 } catch ( e ) {
938 return false;
939 } finally {
940
941 // Remove from its parent by default
942 if ( el.parentNode ) {
943 el.parentNode.removeChild( el );
944 }
945
946 // release memory in IE
947 el = null;
948 }
949}
950
951/**
952 * Adds the same handler for all of the specified attrs

Callers 1

jquery-3.5.1.jsFile · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected