jquery element in dom (v46)

Revision 46 of this benchmark created by Mikhail on


Preparation HTML

<div id="element"></div>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>

Setup

var el = $("#element");

Test runner

Ready to run.

Testing in
TestOps/sec
selector
el.closest("html");
ready
object
el.closest(document.documentElement);
ready
jQuery.contains documentElement
$.contains(document.documentElement, el[0])
ready
jQuery.contains document
$.contains(document, el[0])
ready

Revisions

You can edit these tests or add more tests to this page by appending /edit to the URL.