- ✅ domly - like Dolly the sheep, DOMly uses
cloneNode
andcreateElement
to be fast (via Aysegul Yonet). 🐑 - dolly - like Dolly the sheep, the language clones HTML" (via Aysegul Yonet)
- doml - dom language
- domtl - dom template language
- domtml - dom template markup language
- tmul - "template mark-up language" (via Parag Tope)
- Also stands for "The Milwaukee Urban League" and a problem code from SPOJ
- templet - "root word of template, petite version of template" (via Parag Tope)
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
function delegate(el, type, selector, callback) { | |
el = typeof el === 'string' ? document.querySelector(el) : el; | |
if (!el) return; | |
el.addEventListener(type, function(event) { | |
var node = event.target; | |
while (node && node !== el) { | |
if (node.matches(selector)) | |
callback.call(node, event); | |
node = node.parentNode; | |
} |
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
<div> | |
<h1>Category: {{data.category}}</h1> | |
<if data.items.length> | |
<ul> | |
<foreach data.items> | |
<li> | |
<h2>{{parent.category}}: {{data.name}}</h2> | |
<h3 if-data.sale='class="sale"'>{{data.rice}}</h3> | |
<h3>{{formatCount(data.stockCount)}} in stock</h3> | |
<button unless-data.stockCount='disabled="disabled"'>Buy now</button> |
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
// Define a class | |
var A = Class({ | |
toString: 'A', | |
// Define a method | |
method: function() { | |
return 'ClassA'; | |
} | |
}); |
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
var boxMaterial = new THREE.LineBasicMaterial({ | |
color: new THREE.Color('red') | |
}); | |
// Create the lines for the "2D box" | |
var boxGeometry = new THREE.Geometry(); | |
boxGeometry.vertices.push(new THREE.Vector3(-1, 0, 0)); | |
boxGeometry.vertices.push(new THREE.Vector3( 0, 1, 0)); | |
boxGeometry.vertices.push(new THREE.Vector3( 1, 0, 0)); | |
boxGeometry.vertices.push(new THREE.Vector3( 0, -1, 0)); |
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
uniform vec3 glowColor; | |
uniform float coeficient; | |
uniform float cutoff; | |
uniform float power; | |
varying vec3 vVertexNormal; | |
varying vec3 vVertexWorldPosition; | |
void main(){ | |
vec3 worldCameraToVertex = vVertexWorldPosition - cameraPosition; |
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
Backbone.SuperRouter = Backbone.Router.extend({ | |
// The name of the application (used when setting title) | |
appName: 'MyApp', | |
// The default route | |
homeRoute: '/', | |
// List of URLs to avoid tracking | |
noTrack: [], | |
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
this["templates"] = {}; | |
this["templates"]["Advanced"] = (function anonymous(data_0) { | |
var data = data_0; | |
var el0 = document.createElement("div"); | |
el0.className = "person"; | |
var el2 = document.createElement("h1"); | |
el2.className = "name"; | |
el2.textContent = data_0["name"]; | |
el0.appendChild(el2); | |
var el4 = document.createElement("h2"); |
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
this["templates"] = {}; | |
this["templates"]["Advanced"] = (function anonymous(data_0) { | |
var data = data_0; | |
var el0 = document.createElement("div"); | |
el0.className = "person"; | |
var el2 = document.createElement("h1"); | |
el2.className = "name"; | |
el2.textContent = data_0["name"]; | |
el0.appendChild(el2); | |
var el4 = document.createElement("h2"); |
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
this["templates"] = {}; | |
this["templates"]["Advanced"] = (function anonymous(data_in) { | |
var data; | |
var stack = [data_in]; | |
var el0 = document.createElement("div"); | |
el0.className = "person"; | |
var el2 = document.createElement("h1"); | |
el2.className = "name"; | |
el2.textContent = stack[0]["name"]; | |
el0.appendChild(el2); |
OlderNewer