Category:Javascript: Difference between revisions
Jump to navigation
Jump to search
(Created page with "Category:Hacking = Hacks = Does obj have obj.magilla? <pre> return obj.hasOwnProperty("magilla"); </pre> = Add Lots of Divs = <syntaxhighlight lang="javascript"> 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); </syntaxhighlight>") |
|||
Line 7: | Line 7: | ||
= Add Lots of Divs = | = Add Lots of Divs = | ||
tested to be very fast (according to an article) | |||
<syntaxhighlight lang="javascript"> | <syntaxhighlight lang="javascript"> | ||
var c = document.createDocumentFragment(); | var c = document.createDocumentFragment(); |
Latest revision as of 01:07, 15 October 2023
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.