body vs document (v13)

Revision 13 of this benchmark created on


Description

Which is quicker with jQuery? Binding to document or 'body' ?

Preparation HTML

<script src="//ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script>

Test runner

Ready to run.

Testing in
TestOps/sec
document
$(document).click(function(e) {



}).click();
ready
body
$(document.body).click(function(e) {



}).click();
ready
window
$(window).click(function(e) {



}).click();
ready

Revisions

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