JSConf.eu opening song - JavaScript Will Listen - Bella Morningstar
- Plask - Dean McNamee
- Plask
/** | |
* @ NAME: Cross-browser TextStorage | |
* @ DESC: text storage solution for your pages | |
* @ COPY: sofish, http://sofish.de | |
*/ | |
typeof window.localStorage == 'undefined' && ~function () { | |
var localStorage = window.localStorage = {}, | |
prefix = 'data-userdata', | |
doc = document, |
<!DOCTYPE html> | |
<!-- | |
This is a simple experiment relying on ECMAScript 6 Proxies. To try this out, | |
use Aurora (http://www.mozilla.org/en-US/firefox/channel/). | |
The goal was to create a HTML writer where the method names were really just | |
the HTML tags names, but without manually creating each method. This uses | |
a Proxy to create a shell to an underlying writer object that checks each | |
method name to see if it's in a list of known tags. |
var NO_TOPIC = -1; | |
var Topic; | |
function Handler(s, t) { | |
this.successor = s || null; | |
this.topic = t || 0; | |
} | |
Handler.prototype = { | |
handle: function () { |
//Came across this in the es-discuss list, on the "clean scope" thread: | |
https://mail.mozilla.org/pipermail/es-discuss/2011-August/thread.html#16294 | |
//I do not understand what the "null," part buys. | |
//Has to do something with scope(?), but at least in Firebug, | |
//I can see foo inside the string being evaled. | |
var foo = 'foo'; | |
(null,eval)('(function(){console.log(foo);}())'); |
This is a notepad for my journey to learn opengl's programmable pipeline
// Accessorizer's default generated singleton code for class Foo | |
static Foo *sharedInstance = nil; | |
+ (void) initialize | |
{ | |
if (sharedInstance == nil) | |
sharedInstance = [[self alloc] init]; | |
} |
util.request = (function(){ | |
var fn = { | |
body: 'return null' | |
}; | |
if ('XDomainRequest' in window){ | |
fn.body = 'return new XDomainRequest();'; | |
fn.xdomain = true; | |
} else if ('XMLHttpRequest' in window) { | |
fn.body = 'return new XMLHttpRequest();'; |