Comparing version 0.3.1 to 0.3.2
@@ -175,5 +175,5 @@ (function (global, factory) { | ||
do { | ||
l = t.__handlers[toLower(event.type)]; | ||
l = t.__handlers && t.__handlers[toLower(event.type)]; | ||
if (l) for (i=l.length; i--; ) { | ||
if ((l[i](event)===false || event._end) && c) break; | ||
if ((l[i].call(t, event)===false || event._end) && c) break; | ||
} | ||
@@ -180,0 +180,0 @@ } while (event.bubbles && !(c && event._stop) && (event.target=t=t.parentNode)); |
@@ -1,2 +0,2 @@ | ||
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):t.undom=e()}(this,function(){function t(t,e){for(var n in e)t[n]=e[n]}function e(t){return String(t).toLowerCase()}function n(t,e,n,r){var i=t?o(t,e,!0,r):-1;return~i&&(n?t.splice(i,0,n):t.splice(i,1)),i}function o(t,e,n,o){for(var r=t.length;r--&&("function"!=typeof e||o?t[r]!==e:!e(t[r])););return n?r:t[r]}function r(t,n){return function(o){return o.ns===t&&e(o.name)===e(n)}}function i(){function i(t){return 1===t.nodeType}function u(t){return new a(null,String(t).toUpperCase())}function s(t,e){var n=u(e);return n.namespace=t,n}function p(t){return new l(t)}function c(){var e=new f;return t(e,e.defaultView={document:e,Document:f,Node:d,Text:l,Element:a,SVGElement:a,Event:b}),t(e,{documentElement:e,createElement:u,createElementNS:s,createTextNode:p}),e.appendChild(e.body=u("body")),e}var d=function(t,e){this.nodeType=t,this.nodeName=e,this.childNodes=[]},h={nextSibling:{},previousSibling:{},firstChild:{},lastChild:{}};h.nextSibling.get=function(){var t=this.parentNode;if(t)return t.childNodes[o(t.childNodes,this,!0)+1]},h.previousSibling.get=function(){var t=this.parentNode;if(t)return t.childNodes[o(t.childNodes,this,!0)-1]},h.firstChild.get=function(){return this.childNodes[0]},h.lastChild.get=function(){return this.childNodes[this.childNodes.length-1]},d.prototype.appendChild=function(t){this.insertBefore(t)},d.prototype.insertBefore=function(t,e){t.remove(),t.parentNode=this,e?n(this.childNodes,e,t):this.childNodes.push(t)},d.prototype.replaceChild=function(t,e){e.parentNode===this&&(this.insertBefore(t,e),e.remove())},d.prototype.removeChild=function(t){n(this.childNodes,t)},d.prototype.remove=function(){this.parentNode&&this.parentNode.removeChild(this)},Object.defineProperties(d.prototype,h);var l=function(t){function e(e){t.call(this,3,"#text"),this.nodeValue=e}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var n={textContent:{}};return n.textContent.set=function(t){this.nodeValue=t},n.textContent.get=function(){return this.nodeValue},Object.defineProperties(e.prototype,n),e}(d),a=function(t){function u(e,n){t.call(this,e||1,n),this.attributes=[],this.__handlers={}}t&&(u.__proto__=t),u.prototype=Object.create(t&&t.prototype),u.prototype.constructor=u;var s={children:{}};return s.children.get=function(){return this.childNodes.filter(i)},u.prototype.setAttribute=function(t,e){this.setAttributeNS(null,t,e)},u.prototype.getAttribute=function(t){return this.getAttributeNS(null,t)},u.prototype.removeAttribute=function(t){this.removeAttributeNS(null,t)},u.prototype.setAttributeNS=function(t,e,n){var i=o(this.attributes,r(t,e));i||this.attributes.push(i={ns:t,name:e}),i.value=String(n)},u.prototype.getAttributeNS=function(t,e){var n=o(this.attributes,r(t,e));return n&&n.value},u.prototype.removeAttributeNS=function(t,e){n(this.attributes,r(t,e))},u.prototype.addEventListener=function(t,n){(this.__handlers[e(t)]||(this.__handlers[e(t)]=[])).push(n)},u.prototype.removeEventListener=function(t,o){n(this.__handlers[e(t)],o,0,!0)},u.prototype.dispatchEvent=function(t){var n,o,r=t.currentTarget=this,i=t.cancelable;do if(n=r.__handlers[e(t.type)])for(o=n.length;o--&&(n[o](t)!==!1&&!t._end||!i););while(t.bubbles&&(!i||!t._stop)&&(t.target=r=r.parentNode));return!t.defaultPrevented},Object.defineProperties(u.prototype,s),u}(d),f=function(t){function e(){t.call(this,9,"#document")}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e}(a),b=function(t,e){this.type=t,this.bubbles=!!e.bubbles,this.cancelable=!!e.cancelable};return b.prototype.stopPropagation=function(){this._stop=!0},b.prototype.stopImmediatePropagation=function(){this._end=this._stop=!0},b.prototype.preventDefault=function(){this.defaultPrevented=!0},c()}return i}); | ||
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):t.undom=e()}(this,function(){function t(t,e){for(var n in e)t[n]=e[n]}function e(t){return String(t).toLowerCase()}function n(t,e,n,r){var i=t?o(t,e,!0,r):-1;return~i&&(n?t.splice(i,0,n):t.splice(i,1)),i}function o(t,e,n,o){for(var r=t.length;r--&&("function"!=typeof e||o?t[r]!==e:!e(t[r])););return n?r:t[r]}function r(t,n){return function(o){return o.ns===t&&e(o.name)===e(n)}}function i(){function i(t){return 1===t.nodeType}function u(t){return new a(null,String(t).toUpperCase())}function s(t,e){var n=u(e);return n.namespace=t,n}function p(t){return new l(t)}function c(){var e=new f;return t(e,e.defaultView={document:e,Document:f,Node:d,Text:l,Element:a,SVGElement:a,Event:b}),t(e,{documentElement:e,createElement:u,createElementNS:s,createTextNode:p}),e.appendChild(e.body=u("body")),e}var d=function(t,e){this.nodeType=t,this.nodeName=e,this.childNodes=[]},h={nextSibling:{},previousSibling:{},firstChild:{},lastChild:{}};h.nextSibling.get=function(){var t=this.parentNode;if(t)return t.childNodes[o(t.childNodes,this,!0)+1]},h.previousSibling.get=function(){var t=this.parentNode;if(t)return t.childNodes[o(t.childNodes,this,!0)-1]},h.firstChild.get=function(){return this.childNodes[0]},h.lastChild.get=function(){return this.childNodes[this.childNodes.length-1]},d.prototype.appendChild=function(t){this.insertBefore(t)},d.prototype.insertBefore=function(t,e){t.remove(),t.parentNode=this,e?n(this.childNodes,e,t):this.childNodes.push(t)},d.prototype.replaceChild=function(t,e){e.parentNode===this&&(this.insertBefore(t,e),e.remove())},d.prototype.removeChild=function(t){n(this.childNodes,t)},d.prototype.remove=function(){this.parentNode&&this.parentNode.removeChild(this)},Object.defineProperties(d.prototype,h);var l=function(t){function e(e){t.call(this,3,"#text"),this.nodeValue=e}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var n={textContent:{}};return n.textContent.set=function(t){this.nodeValue=t},n.textContent.get=function(){return this.nodeValue},Object.defineProperties(e.prototype,n),e}(d),a=function(t){function u(e,n){t.call(this,e||1,n),this.attributes=[],this.__handlers={}}t&&(u.__proto__=t),u.prototype=Object.create(t&&t.prototype),u.prototype.constructor=u;var s={children:{}};return s.children.get=function(){return this.childNodes.filter(i)},u.prototype.setAttribute=function(t,e){this.setAttributeNS(null,t,e)},u.prototype.getAttribute=function(t){return this.getAttributeNS(null,t)},u.prototype.removeAttribute=function(t){this.removeAttributeNS(null,t)},u.prototype.setAttributeNS=function(t,e,n){var i=o(this.attributes,r(t,e));i||this.attributes.push(i={ns:t,name:e}),i.value=String(n)},u.prototype.getAttributeNS=function(t,e){var n=o(this.attributes,r(t,e));return n&&n.value},u.prototype.removeAttributeNS=function(t,e){n(this.attributes,r(t,e))},u.prototype.addEventListener=function(t,n){(this.__handlers[e(t)]||(this.__handlers[e(t)]=[])).push(n)},u.prototype.removeEventListener=function(t,o){n(this.__handlers[e(t)],o,0,!0)},u.prototype.dispatchEvent=function(t){var n,o,r=t.currentTarget=this,i=t.cancelable;do if(n=r.__handlers&&r.__handlers[e(t.type)])for(o=n.length;o--&&(n[o].call(r,t)!==!1&&!t._end||!i););while(t.bubbles&&(!i||!t._stop)&&(t.target=r=r.parentNode));return!t.defaultPrevented},Object.defineProperties(u.prototype,s),u}(d),f=function(t){function e(){t.call(this,9,"#document")}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e}(a),b=function(t,e){this.type=t,this.bubbles=!!e.bubbles,this.cancelable=!!e.cancelable};return b.prototype.stopPropagation=function(){this._stop=!0},b.prototype.stopImmediatePropagation=function(){this._end=this._stop=!0},b.prototype.preventDefault=function(){this.defaultPrevented=!0},c()}return i}); | ||
//# sourceMappingURL=undom.min.js.map |
{ | ||
"name": "undom", | ||
"amdName": "undom", | ||
"version": "0.3.1", | ||
"version": "0.3.2", | ||
"description": "Minimally viable DOM Document implementation.", | ||
@@ -6,0 +6,0 @@ "main": "dist/undom.js", |
@@ -135,5 +135,5 @@ import { | ||
do { | ||
l = t.__handlers[toLower(event.type)]; | ||
l = t.__handlers && t.__handlers[toLower(event.type)]; | ||
if (l) for (i=l.length; i--; ) { | ||
if ((l[i](event)===false || event._end) && c) break; | ||
if ((l[i].call(t, event)===false || event._end) && c) break; | ||
} | ||
@@ -140,0 +140,0 @@ } while (event.bubbles && !(c && event._stop) && (event.target=t=t.parentNode)); |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
50651