diff --git a/build.bat b/build.bat index c065e05..1623f75 100644 --- a/build.bat +++ b/build.bat @@ -1 +1 @@ -java -jar compiler.jar --language_in ECMASCRIPT5 --output_wrapper "/* Doom.js Library Version: 1.2.0 Copyright (c) 2015 Iain Shorter */window.Doom = {}; (function() {'use strict';%%output%%})();" --js_output_file=build/Doom.js src/Classlist.js src/Promise.js src/Contains.js src/AlloyElement.js src/CreateElement.js src/Fetch.js src/ModifyElement.js src/RemoveElement.js src/Search.js src/TouchGestures.js +java -jar compiler.jar --language_in ECMASCRIPT5 --output_wrapper "/* Doom.js Library Version: 1.3.0 Copyright (c) 2015 Iain Shorter */if(!window.Doom){window.Doom = {}; (function() {'use strict';%%output%%})();}" --js_output_file=build/Doom.js src/Classlist.js src/Promise.js src/Contains.js src/AlloyElement.js src/CreateElement.js src/Fetch.js src/ModifyElement.js src/RemoveElement.js src/Search.js src/TouchGestures.js src/MutationEvents.js \ No newline at end of file diff --git a/build.sh b/build.sh index d9d2a1d..dcc40fa 100644 --- a/build.sh +++ b/build.sh @@ -1 +1 @@ -java -jar compiler.jar --language_in ECMASCRIPT5 --output_wrapper "/* Doom.js Library Version: 1.2.0 Copyright (c) 2015 Iain Shorter */if(!window.Doom){window.Doom = {}; (function() {'use strict';%output%})();}" --js_output_file=build/Doom.js src/Classlist.js src/Promise.js src/Contains.js src/AlloyElement.js src/CreateElement.js src/Fetch.js src/ModifyElement.js src/RemoveElement.js src/Search.js src/TouchGestures.js +java -jar compiler.jar --language_in ECMASCRIPT5 --output_wrapper "/* Doom.js Library Version: 1.3.0 Copyright (c) 2015 Iain Shorter */if(!window.Doom){window.Doom = {}; (function() {'use strict';%output%})();}" --js_output_file=build/Doom.js src/Classlist.js src/Promise.js src/Contains.js src/AlloyElement.js src/CreateElement.js src/Fetch.js src/ModifyElement.js src/RemoveElement.js src/Search.js src/TouchGestures.js src/MutationEvents.js \ No newline at end of file diff --git a/build/Doom.js b/build/Doom.js index 0b66103..3400ef6 100644 --- a/build/Doom.js +++ b/build/Doom.js @@ -1,31 +1,36 @@ -/* Doom.js Library Version: 1.2.0 Copyright (c) 2015 Iain Shorter */window.Doom = {}; (function() {'use strict';"indexOf"in Array.prototype||Object.defineProperty(Array.prototype,"indexOf",{value:function(b,a){for(var d=+a||0,e=this.length;dg.status&&200<=g.status?f(g.response):k(g)};g.onerror=function(){k(g)};g.onabort=function(){k(g)};0!==r&&setTimeout(g.abort.bind(g),r);"json"===q?g.send(e.data?JSON.stringify(e.data):null):"url"===q&&g.send(e.data?b(e.data):null)})};Doom.fetch.DEFAULTS=d})();(function(){function b(d){var e=d.element,f,k;if(e)if("string"===typeof e)e=Doom.search(e),d.element=e,b(d);else{if(!1===e instanceof HTMLElement&&e[0]){f=0;for(k=~~e.length;fp.PAN_MINDELTA&&(Math.abs(c.dist_x)>Math.abs(c.dist_y)?(c.direction=0p.SWIPE_MINSPEED&&(Math.abs(c.dist_x)>Math.abs(c.dist_y)?(c.direction=0g.status&&200<=g.status?f(g.response):h(g)};g.onerror=function(){h(g)};g.onabort=function(){h(g)};0!==s&&setTimeout(g.abort.bind(g),s);"json"===r?g.send(e.data?JSON.stringify(e.data):null):"url"===r&&g.send(e.data?b(e.data):null)})};Doom.fetch.DEFAULTS=d})();(function(){function b(d){var e=d.element,f,h;if(e)if("string"===typeof e)e=Doom.search(e),d.element=e,b(d);else{if(!1===e instanceof HTMLElement&&e[0]){f=0;for(h=~~e.length;fl.PAN_MINDELTA&&(Math.abs(c.dist_x)>Math.abs(c.dist_y)?(c.direction=0l.SWIPE_MINSPEED&&(Math.abs(c.dist_x)>Math.abs(c.dist_y)?(c.direction=0= MAX_REPEAT) + throw new Error("Observed element mutation exceeded maximum cyclic changes"); + + poll(repeat + 1); + } + } + + /* + Starts the timer if it isn't running. + */ + function start () { + if (timerRef) + return; + + timerRef = setFrameInterval(poll); + } + + /* + Stops the timer if it is running. + */ + function stop () { + if (!timerRef) + return; + + timerRef(); + timerRef = null; + } + Doom.addMutationEvent = addHandler; + Doom.removeMutationEvent = removeHandler; + // Doom.expressMutation = function () { + // poll(0); + // }; +}()); \ No newline at end of file diff --git a/test/domevents.html b/test/domevents.html new file mode 100644 index 0000000..eab56ee --- /dev/null +++ b/test/domevents.html @@ -0,0 +1,88 @@ + + + + + + + \ No newline at end of file