MCPcopy Create free account
hub / github.com/dtmilano/AndroidViewClient / assert

Function assert

docs/_static/jquery-3.6.0.js:936–953  ·  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

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

Callers 1

jquery-3.6.0.jsFile · 0.85

Calls 1

fnFunction · 0.85

Tested by

no test coverage detected