MCPcopy Index your code
hub / github.com/frank-lam/fullstack-tutorial / assert

Function assert

notes/docsify/unpkg/gotop/jquery-2.1.0.js:875–890  ·  view source on GitHub ↗

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

( fn )

Source from the content-addressed store, hash-verified

873 * @param {Function} fn Passed the created div and expects a boolean result
874 */
875function assert( fn ) {
876 var div = document.createElement("div");
877
878 try {
879 return !!fn( div );
880 } catch (e) {
881 return false;
882 } finally {
883 // Remove from its parent by default
884 if ( div.parentNode ) {
885 div.parentNode.removeChild( div );
886 }
887 // release memory in IE
888 div = null;
889 }
890}
891
892/**
893 * Adds the same handler for all of the specified attrs

Callers 1

jquery-2.1.0.jsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…