MCPcopy
hub / github.com/geekape/geek-navigation / assert

Function assert

js/jquery.js:920–935  ·  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

918 * @param {Function} fn Passed the created element and returns a boolean result
919 */
920function assert( fn ) {
921 var el = document.createElement("fieldset");
922
923 try {
924 return !!fn( el );
925 } catch (e) {
926 return false;
927 } finally {
928 // Remove from its parent by default
929 if ( el.parentNode ) {
930 el.parentNode.removeChild( el );
931 }
932 // release memory in IE
933 el = null;
934 }
935}
936
937/**
938 * 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