Skip to content

Instantly share code, notes, and snippets.

View akx's full-sized avatar
👹
rer

Aarni Koskela akx

👹
rer
View GitHub Profile
@akx
akx / gist:1878050
Created February 21, 2012 18:41 — forked from neilj/gist:1532562
Sugared DOM: Better Than Templates
# Note: This is actually Coco (http://github.com/satyr/coco), not CoffeeScript.
# I haven't tested this, just wanted to see how concise I could make of the Coco implementation.
el = let
doc = document
directProperties = {
class: \className, \className, \defaultValue,
for: \htmlFor, html: \innerHTML, text: \textContent, \value
}
booleanProperties = {+checked, +defaultChecked, +disabled, +multiple, +selected}