#ECMAScript 1
In the beginning, there was ECMAScript 1. It listed the following reserved words:
do
if
in
for
new
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE | |
Version 2, December 2004 | |
Copyright (C) 2013 Yannick Albert <http://yckart.com> | |
Everyone is permitted to copy and distribute verbatim or modified | |
copies of this license document, and changing it is allowed as long | |
as the name is changed. | |
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE |
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE | |
Version 2, December 2004 | |
Copyright (C) 2013 Yannick Albert <http://yckart.com> | |
Everyone is permitted to copy and distribute verbatim or modified | |
copies of this license document, and changing it is allowed as long | |
as the name is changed. | |
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE |
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE | |
Version 2, December 2004 | |
Copyright (C) 2013 Yannick Albert <http://yckart.com> | |
Everyone is permitted to copy and distribute verbatim or modified | |
copies of this license document, and changing it is allowed as long | |
as the name is changed. | |
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE |
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE | |
Version 2, December 2004 | |
Copyright (C) 2013 Yannick Albert <http://yckart.com> | |
Everyone is permitted to copy and distribute verbatim or modified | |
copies of this license document, and changing it is allowed as long | |
as the name is changed. | |
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE |
var DOMReady = function r(fn) { | |
if (document.readyState === 'complete') return fn(); | |
setTimeout(function () { | |
r(fn); | |
}); | |
}; |
// call after last delay | |
function debounce(callback, delay) { | |
var timeout; | |
return function () { | |
var self = this, args = arguments; | |
if (timeout) clearTimeout(timeout); | |
timeout = setTimeout(function () { | |
callback.apply(self, args); | |
}, delay || 100); | |
}; |
#ECMAScript 1
In the beginning, there was ECMAScript 1. It listed the following reserved words:
do
if
in
for
new
// Set the graphics attributes specified by the properties of the object o. | |
// Or, if no argument is passed, return the current attributes as an object. | |
// Note that this does not handle the transformation or clipping region. | |
CanvasRenderingContext2D.prototype.attr = function (key, val) { | |
var keyString = typeof key === 'string'; | |
var valUndefined = typeof val === 'undefined'; | |
var styles = { | |
fillStyle: this.fillStyle, | |
font: this.font, |
// jonathantneal's polyfill for matchesSelector | |
if (this.Element) function(ElementPrototype) { | |
ElementPrototype.matches = ElementPrototype.matchesSelector = | |
ElementPrototype.matchesSelector || | |
ElementPrototype.webkitMatchesSelector || | |
ElementPrototype.mozMatchesSelector || | |
ElementPrototype.msMatchesSelector || | |
ElementPrototype.oMatchesSelector || | |
function (selector) { | |
var nodes = (this.parentNode || this.document).querySelectorAll(selector), i = -1; |