MCPcopy Index your code
hub / github.com/hokein/electron-sample-apps / assert

Function assert

camera/jquery.js:879–894  ·  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

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

Callers 1

jquery.jsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected