MCPcopy Create free account
hub / github.com/TanaStudy/Java-Study / assert

Function assert

5. SpringMVC/springmvc-06-ajax/web/static/js/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 */
936 function 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.70

Calls 1

fnFunction · 0.50

Tested by

no test coverage detected