This file contains hidden or 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 msg = document.getElementById('msg'); | |
| var msgs = []; | |
| var log = function(m, e){ | |
| if (e) console.log(e); | |
| msgs.unshift(m + ' ' + new Date().getTime()); | |
| msgs = msgs.slice(0,5); | |
| msg.innerHTML = msgs.join('<br/>'); | |
| }; | |
| var logEvent = function(e){ |
This file contains hidden or 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 sanitize = (function(doc){ | |
| var slice = Array.prototype.slice, | |
| range = doc.createRange(), | |
| frag = doc.createDocumentFragment(), | |
| wrap = frag.appendChild(doc.createElement('div')); | |
| function cleanNode(node, unwrap){ | |
| var parent = node.parentNode; | |
| if (unwrap){ |
This file contains hidden or 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
| accessors: { | |
| foo: { | |
| attribute: { boolean: true } | |
| set: function(){ | |
| // do something when this prop is set | |
| } | |
| } | |
| } |
This file contains hidden or 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 replaceSpaces = / /g; | |
| xtag.customEvents.transitionall = { | |
| observe: { transitionend: document }, | |
| condition: function(e, tap){ | |
| var element = e.target; | |
| if (!element.__transall__ && (element.__tranend__ ? element.__tranend__ > e.elapsedTime : true)) { | |
| delete element.__transtime__; | |
| var trans = element.__transall__ = { duration: 0 }; | |
| style = getComputedStyle(element), | |
| props = (style.transitionProperty || style[xtag.prefix.js + 'TransitionProperty']).replace(replaceSpaces, '').split(','), |
This file contains hidden or 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 replaceSpaces = / /g; | |
| xtag.customEvents.transitionall = { | |
| observe: { transitionend: document }, | |
| condition: function(e, tap){ | |
| var element = e.target; | |
| if (!element.__transall__ && (element.__tranend__ ? element.__tranend__ > e.elapsedTime : true)) { | |
| delete element.__transtime__; | |
| var trans = element.__transall__ = { duration: 0 }; | |
| style = getComputedStyle(element), | |
| props = (style.transitionProperty || style[xtag.prefix.js + 'TransitionProperty']).replace(replaceSpaces, '').split(','), |
This file contains hidden or 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(){ | |
| var directions = { | |
| up: 0, | |
| down: 180, | |
| left: 270, | |
| right: 90 | |
| }; | |
This file contains hidden or 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(){ | |
| var views = {}; | |
| var setAttrProto = Element.prototype.setAttribute; | |
| var removeAttrProto = Element.prototype.removeAttribute; | |
| /*** Prototype Upgrades ***/ | |
| Element.prototype.setAttribute = function(name, value){ | |
| if (name == 'view') switchView(this, value); |
This file contains hidden or 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(){ | |
| var directions = { | |
| up: 0, | |
| down: 180, | |
| left: 270, | |
| right: 90 | |
| }; | |
This file contains hidden or 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 replaceSpaces = / /g; | |
| xtag.customEvents.transitionall = { | |
| observe: { transitionend: document }, | |
| condition: function(e, tap){ | |
| var element = e.target; | |
| if (!element.__transall__ && (element.__tranend__ ? element.__tranend__ > e.elapsedTime : true)) { | |
| delete element.__transtime__; | |
| var trans = element.__transall__ = { duration: 0 }; | |
| style = getComputedStyle(element), | |
| props = (style.transitionProperty || style[xtag.prefix.js + 'TransitionProperty']).replace(replaceSpaces, '').split(','), |