MCPcopy Index your code
hub / github.com/JsAaron/jQuery / assert

Function assert

2.1.1/test/sizzle.js:341–356  ·  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

339 * @param {Function} fn Passed the created div and expects a boolean result
340 */
341function assert( fn ) {
342 var div = document.createElement("div");
343
344 try {
345 return !!fn( div );
346 } catch (e) {
347 return false;
348 } finally {
349 // Remove from its parent by default
350 if ( div.parentNode ) {
351 div.parentNode.removeChild( div );
352 }
353 // release memory in IE
354 div = null;
355 }
356}
357
358/**
359 * Adds the same handler for all of the specified attrs

Callers 1

sizzle.jsFile · 0.70

Calls 1

fnFunction · 0.50

Tested by

no test coverage detected