This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!doctype html> | |
<html lang="en" dir="ltr"> | |
<head> | |
<title>NodeList/HTMLCollection conversion/concatenation to array (testing)</title> | |
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"> | |
<script type="text/javascript"> | |
// get elapsed time | |
function timeElapsed(t) { return ((new Date()).getTime() - t); } | |
onload = function() { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// first alert(1), then alert(2) | |
var foo = 1; | |
alert(1); | |
var bar = (function(){ alert(2); })(); | |
// first alert(2), then alert(1) | |
var foo=1,bar=(function(){alert(2);})();alert(1); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html> | |
<head> | |
<title>Quirk Mode Test for Safari 2.0.x and other old browsers</title> | |
<meta http-equiv="content-type" content="text/html; charset=utf-8"> | |
<script type="text/javascript"> | |
// adapted from http://code.google.com/p/doctype/wiki/ArticleCompatMode | |
document.compatMode || (document.compatMode = | |
(function() { | |
var el; (el = document.createElement('div')).style.width = 1; | |
return el.style.width == '1px' ? 'BackCompat' : 'CSS1Compat'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* can you spot what is happening here */ | |
/* the alert("X") should never execute */ | |
<script> | |
onload = function() { | |
var fn = function() { | |
alert("X"); | |
} | |
(function() { })(); |
NewerOlder