Category:Javascript

From Traxel Wiki
Revision as of 01:07, 15 October 2023 by RobertBushman (talk | contribs) (→‎Add Lots of Divs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Hacks

Does obj have obj.magilla?

return obj.hasOwnProperty("magilla");

Add Lots of Divs

tested to be very fast (according to an article)

var c = document.createDocumentFragment();
for (var i=0; i<10000; i++) {
    var e = document.createElement("div");
    e.className = "test-div";
    c.appendChild(e);
}
document.body.appendChild(c);

Pages in category "Javascript"

This category contains only the following page.