seamless-scroll-polyfill
Advanced tools
Comparing version 1.0.9 to 1.0.10
@@ -376,3 +376,3 @@ "use strict"; | ||
Element.prototype.scrollIntoView = function scrollIntoView(arg) { | ||
if (typeof arg === "boolean") { | ||
if (typeof arg === "boolean" || arg === undefined) { | ||
return originalFunc.call(this, arg); | ||
@@ -379,0 +379,0 @@ } |
@@ -1,2 +0,2 @@ | ||
(function(a){"function"==typeof define&&define.amd?define(a):a()})(function(){'use strict';function a(a){var b="function"==typeof Symbol&&a[Symbol.iterator],c=0;return b?b.call(a):{next:function(){return a&&c>=a.length&&(a=void 0),{value:a&&a[c++],done:!a}}}}function b(a,b){var c="function"==typeof Symbol&&a[Symbol.iterator];if(!c)return a;var d,f,g=c.call(a),h=[];try{for(;(void 0===b||0<b--)&&!(d=g.next()).done;)h.push(d.value)}catch(a){f={error:a}}finally{try{d&&!d.done&&(c=g["return"])&&c.call(g)}finally{if(f)throw f.error}}return h}function c(a,b,c,d,e,f,g,h){return f<a&&g>b||f>a&&g<b?0:f<=a&&h<=c||g>=b&&h>=c?f-a-d:g>b&&h<c||f<a&&h>c?g-b+e:0}var d,e,f,g,h,i=function(){return i=Object.assign||function(a){for(var b,c=1,d=arguments.length;c<d;c++)for(var e in b=arguments[c],b)Object.prototype.hasOwnProperty.call(b,e)&&(a[e]=b[e]);return a},i.apply(this,arguments)},j=function(a){return .5*(1-Math.cos(Math.PI*a))},k=function(){return(performance&&performance.now?performance:Date).now()},l=function(a){var b=k(),c=(b-a.timeStamp)/(a.duration||500);if(1<c)return a.method(a.targetX,a.targetY),void a.callback();var d=(a.timingFunc||j)(c),e=a.startX+(a.targetX-a.startX)*d,f=a.startY+(a.targetY-a.startY)*d;a.method(e,f),a.rafId=requestAnimationFrame(function(){l(a)})},m=function(){return void 0===d&&(d=Element.prototype.scroll||Element.prototype.scrollTo||function(a,b){this.scrollLeft=a,this.scrollTop=b}),d},n=function(a,b){var c=m().bind(a);if(void 0!==b.left||void 0!==b.top){var d=a.scrollLeft,e=a.scrollTop,f=b.left,g=void 0===f?d:f,h=b.top,i=void 0===h?e:h;if("smooth"!==b.behavior)return c(g,i);var j=function(){window.removeEventListener("wheel",o),window.removeEventListener("touchmove",o)},n={timeStamp:k(),duration:b.duration,startX:d,startY:e,targetX:g,targetY:i,rafId:0,method:c,timingFunc:b.timingFunc,callback:j},o=function(){cancelAnimationFrame(n.rafId),j()};window.addEventListener("wheel",o,{passive:!0,once:!0}),window.addEventListener("touchmove",o,{passive:!0,once:!0}),l(n)}},o=function(a){var c=m();Element.prototype.scroll=function(){var d=b(arguments,2),e=d[0],f=void 0===e?0:e,g=d[1],h=void 0===g?0:g;if("number"==typeof f&&"number"==typeof h)return c.call(this,f,h);if(Object(f)!==f)throw new TypeError("Failed to execute 'scroll' on 'Element': parameter 1 ('options') is not an object.");return n(this,i(i({},f),a))}},p=function(a,b){var c=(b.left||0)+a.scrollLeft,d=(b.top||0)+a.scrollTop;return n(a,i(i({},b),{left:c,top:d}))},q=function(a){Element.prototype.scrollBy=function(){var c=b(arguments,2),d=c[0],e=void 0===d?0:d,f=c[1],g=void 0===f?0:f;if("number"==typeof e&&"number"==typeof g)return p(this,{left:e,top:g});if(Object(e)!==e)throw new TypeError("Failed to execute 'scrollBy' on 'Element': parameter 1 ('options') is not an object.");return p(this,i(i({},e),a))}},r=function(a,b,c,d){var e=0===b&&c||1===b&&!c?a.inline:a.block;return"center"===e?1:"nearest"===e?0:"start"===e?0===b?d?5:4:2:"end"===e?0===b?d?4:5:3:c?0===b?0:2:0===b?4:0},s=function(a){return"visible"!==a&&"clip"!==a},t=function(a){if(a.clientHeight<a.scrollHeight||a.clientWidth<a.scrollWidth){var b=getComputedStyle(a);return s(b.overflowY)||s(b.overflowX)}return!1},u=function(a){var b=a.parentNode;return b&&(b.nodeType===Node.DOCUMENT_FRAGMENT_NODE?b.host:b)},v=function(b,d){var e,f;if(b.ownerDocument.documentElement.contains(b)){for(var g=document.scrollingElement||document.documentElement,h=[],j=u(b);null!==j;j=u(j)){if(j===g){h.push(j);break}(j!==document.body||!t(j)||t(document.documentElement))&&t(j)&&h.push(j)}var k=window.visualViewport?window.visualViewport.width:innerWidth,l=window.visualViewport?window.visualViewport.height:innerHeight,m=window.scrollX||window.pageXOffset,o=window.scrollY||window.pageYOffset,p=b.getBoundingClientRect(),q=p.height,s=p.width,v=p.top,w=p.right,x=p.bottom,y=p.left,z=getComputedStyle(b),A=z.writingMode||z.webkitWritingMode||z.getPropertyValue("-ms-writing-mode")||"horizontal-tb",B=["horizontal-tb","lr","lr-tb","rl"].some(function(a){return a===A}),C=["vertical-rl","tb-rl"].some(function(a){return a===A}),D=r(d,0,B,C),E=r(d,1,B,C),F=function(){return 2===E||0===E?v:3===E?x:v+q/2}(),G=function(){return 1===D?y+s/2:5===D?w:y}(),H=[],I=function(a){var b=Math.min,e=Math.max,f=a.getBoundingClientRect(),h=f.height,j=f.width,p=f.top,r=f.right,t=f.bottom,u=f.left,v=getComputedStyle(a),w=parseInt(v.borderLeftWidth,10),x=parseInt(v.borderTopWidth,10),y=parseInt(v.borderRightWidth,10),z=parseInt(v.borderBottomWidth,10),A=0,B=0,C="offsetWidth"in a?a.offsetWidth-a.clientWidth-w-y:0,I="offsetHeight"in a?a.offsetHeight-a.clientHeight-x-z:0;if(g===a){switch(E){case 2:{A=F;break}case 3:{A=F-l;break}case 1:{A=F-l/2;break}case 0:{A=c(o,o+l,l,x,z,o+F,o+F+q,q);break}}switch(D){case 4:{B=G;break}case 5:{B=G-k;break}case 1:{B=G-k/2;break}case 0:{B=c(m,m+k,k,w,y,m+G,m+G+s,s);break}}A=e(0,A+o),B=e(0,B+m)}else{switch(E){case 2:{A=F-p-x;break}case 3:{A=F-t+z+I;break}case 1:{A=F-(p+h/2)+I/2;break}case 0:{A=c(p,t,h,x,z+I,F,F+q,q);break}}switch(D){case 4:{B=G-u-w;break}case 5:{B=G-r+y+C;break}case 1:{B=G-(u+j/2)+C/2;break}case 0:{B=c(u,r,j,w,y+C,G,G+s,s);break}}var J=a.scrollLeft,K=a.scrollTop;A=e(0,b(K+A,a.scrollHeight-h+I)),B=e(0,b(J+B,a.scrollWidth-j+C)),F+=K-A,G+=J-B}H.push(function(){return n(a,i(i({},d),{top:A,left:B}))})};try{for(var J,K=a(h),L=K.next();!L.done;L=K.next())J=L.value,I(J)}catch(a){e={error:a}}finally{try{L&&!L.done&&(f=K.return)&&f.call(K)}finally{if(e)throw e.error}}H.forEach(function(a){return a()})}},w=function(){return void 0===e&&(e=document.documentElement.scrollIntoView),e},x=function(a){var b=w();Element.prototype.scrollIntoView=function(c){if("boolean"==typeof c)return b.call(this,c);if(Object(c)!==c)throw new TypeError("Failed to execute 'scrollIntoView' on 'Element': parameter 1 ('options') is not an object.");return v(this,i(i({},c),a))}},y=function(a){var c=m();Element.prototype.scrollTo=function(){var d=b(arguments,2),e=d[0],f=void 0===e?0:e,g=d[1],h=void 0===g?0:g;if("number"==typeof f&&"number"==typeof h)return c.call(this,f,h);if(Object(f)!==f)throw new TypeError("Failed to execute 'scrollTo' on 'Element': parameter 1 ('options') is not an object.");return n(this,i(i({},f),a))}},z=function(){return void 0===f&&(f=(window.scroll||window.scrollTo).bind(window)),f},A=function(a){var b=z();if(void 0!==a.left||void 0!==a.top){var c=window.scrollX||window.pageXOffset,d=window.scrollY||window.pageYOffset,e=a.left,f=void 0===e?c:e,g=a.top,h=void 0===g?d:g;if("smooth"!==a.behavior)return b(f,h);var i=function(){window.removeEventListener("wheel",m),window.removeEventListener("touchmove",m)},j={timeStamp:k(),duration:a.duration,startX:c,startY:d,targetX:f,targetY:h,rafId:0,method:b,timingFunc:a.timingFunc,callback:i},m=function(){cancelAnimationFrame(j.rafId),i()};window.addEventListener("wheel",m,{passive:!0,once:!0}),window.addEventListener("touchmove",m,{passive:!0,once:!0}),l(j)}},B=function(a){var c=z();window.scroll=function(){var d=b(arguments,2),e=d[0],f=void 0===e?0:e,g=d[1],h=void 0===g?0:g;if("number"==typeof f&&"number"==typeof h)return c.call(this,f,h);if(Object(f)!==f)throw new TypeError("Failed to execute 'scroll' on 'Window': parameter 1 ('options') is not an object.");return A(i(i({},f),a))}},C=function(a){var b=(a.left||0)+(window.scrollX||window.pageXOffset),c=(a.top||0)+(window.scrollY||window.pageYOffset);return"smooth"===a.behavior?A(i(i({},a),{left:b,top:c})):z()(b,c)},D=function(a){var c=function(){return void 0===g&&(g=window.scrollBy.bind(window)),g}();window.scrollBy=function(){var d=b(arguments,2),e=d[0],f=void 0===e?0:e,g=d[1],h=void 0===g?0:g;if("number"==typeof f&&"number"==typeof h)return c.call(this,f,h);if(Object(f)!==f)throw new TypeError("Failed to execute 'scrollBy' on 'Window': parameter 1 ('options') is not an object.");return C(i(i({},f),a))}},E=function(){return void 0===h&&(h=(window.scrollTo||window.scroll).bind(window)),h},F=function(a){var c=E();window.scrollTo=function(){var d=b(arguments,2),e=d[0],f=void 0===e?0:e,g=d[1],h=void 0===g?0:g;if("number"==typeof f&&"number"==typeof h)return c.call(this,f,h);if(Object(f)!==f)throw new TypeError("Failed to execute 'scrollTo' on 'Window': parameter 1 ('options') is not an object.");return A(i(i({},f),a))}},G=function(a){"scrollBehavior"in document.documentElement.style||(B(a),F(a),D(a),o(a),y(a),q(a),x(a))};(function(a){if(a){var b=~~a.dataset.duration;b=0<b?b:void 0,G({duration:b})}})(document.currentScript||document.querySelector("script[data-seamless]"))}); | ||
(function(a){"function"==typeof define&&define.amd?define(a):a()})(function(){'use strict';function a(a){var b="function"==typeof Symbol&&Symbol.iterator,c=b&&a[b],d=0;if(c)return c.call(a);if(a&&"number"==typeof a.length)return{next:function(){return a&&d>=a.length&&(a=void 0),{value:a&&a[d++],done:!a}}};throw new TypeError(b?"Object is not iterable.":"Symbol.iterator is not defined.")}function b(a,b){var c="function"==typeof Symbol&&a[Symbol.iterator];if(!c)return a;var d,f,g=c.call(a),h=[];try{for(;(void 0===b||0<b--)&&!(d=g.next()).done;)h.push(d.value)}catch(a){f={error:a}}finally{try{d&&!d.done&&(c=g["return"])&&c.call(g)}finally{if(f)throw f.error}}return h}function c(a,b,c,d,e,f,g,h){return f<a&&g>b||f>a&&g<b?0:f<=a&&h<=c||g>=b&&h>=c?f-a-d:g>b&&h<c||f<a&&h>c?g-b+e:0}var d,e,f,g,h,i=function(){return i=Object.assign||function(a){for(var b,c=1,d=arguments.length;c<d;c++)for(var e in b=arguments[c],b)Object.prototype.hasOwnProperty.call(b,e)&&(a[e]=b[e]);return a},i.apply(this,arguments)},j=function(a){return .5*(1-Math.cos(Math.PI*a))},k=function(){return(performance&&performance.now?performance:Date).now()},l=function(a){var b=k(),c=(b-a.timeStamp)/(a.duration||500);if(1<c)return a.method(a.targetX,a.targetY),void a.callback();var d=(a.timingFunc||j)(c),e=a.startX+(a.targetX-a.startX)*d,f=a.startY+(a.targetY-a.startY)*d;a.method(e,f),a.rafId=requestAnimationFrame(function(){l(a)})},m=function(){return void 0===d&&(d=Element.prototype.scroll||Element.prototype.scrollTo||function(a,b){this.scrollLeft=a,this.scrollTop=b}),d},n=function(a,b){var c=m().bind(a);if(void 0!==b.left||void 0!==b.top){var d=a.scrollLeft,e=a.scrollTop,f=b.left,g=void 0===f?d:f,h=b.top,i=void 0===h?e:h;if("smooth"!==b.behavior)return c(g,i);var j=function(){window.removeEventListener("wheel",o),window.removeEventListener("touchmove",o)},n={timeStamp:k(),duration:b.duration,startX:d,startY:e,targetX:g,targetY:i,rafId:0,method:c,timingFunc:b.timingFunc,callback:j},o=function(){cancelAnimationFrame(n.rafId),j()};window.addEventListener("wheel",o,{passive:!0,once:!0}),window.addEventListener("touchmove",o,{passive:!0,once:!0}),l(n)}},o=function(a){var c=m();Element.prototype.scroll=function(){var d=b(arguments,2),e=d[0],f=void 0===e?0:e,g=d[1],h=void 0===g?0:g;if("number"==typeof f&&"number"==typeof h)return c.call(this,f,h);if(Object(f)!==f)throw new TypeError("Failed to execute 'scroll' on 'Element': parameter 1 ('options') is not an object.");return n(this,i(i({},f),a))}},p=function(a,b){var c=(b.left||0)+a.scrollLeft,d=(b.top||0)+a.scrollTop;return n(a,i(i({},b),{left:c,top:d}))},q=function(a){Element.prototype.scrollBy=function(){var c=b(arguments,2),d=c[0],e=void 0===d?0:d,f=c[1],g=void 0===f?0:f;if("number"==typeof e&&"number"==typeof g)return p(this,{left:e,top:g});if(Object(e)!==e)throw new TypeError("Failed to execute 'scrollBy' on 'Element': parameter 1 ('options') is not an object.");return p(this,i(i({},e),a))}},r=function(a,b,c,d){var e=0===b&&c||1===b&&!c?a.inline:a.block;return"center"===e?1:"nearest"===e?0:"start"===e?0===b?d?5:4:2:"end"===e?0===b?d?4:5:3:c?0===b?0:2:0===b?4:0},s=function(a){return"visible"!==a&&"clip"!==a},t=function(a){if(a.clientHeight<a.scrollHeight||a.clientWidth<a.scrollWidth){var b=getComputedStyle(a);return s(b.overflowY)||s(b.overflowX)}return!1},u=function(a){var b=a.parentNode;return b&&(b.nodeType===Node.DOCUMENT_FRAGMENT_NODE?b.host:b)},v=function(b,d){var e,f;if(b.ownerDocument.documentElement.contains(b)){for(var g=document.scrollingElement||document.documentElement,h=[],j=u(b);null!==j;j=u(j)){if(j===g){h.push(j);break}(j!==document.body||!t(j)||t(document.documentElement))&&t(j)&&h.push(j)}var k=window.visualViewport?window.visualViewport.width:innerWidth,l=window.visualViewport?window.visualViewport.height:innerHeight,m=window.scrollX||window.pageXOffset,o=window.scrollY||window.pageYOffset,p=b.getBoundingClientRect(),q=p.height,s=p.width,v=p.top,w=p.right,x=p.bottom,y=p.left,z=getComputedStyle(b),A=z.writingMode||z.webkitWritingMode||z.getPropertyValue("-ms-writing-mode")||"horizontal-tb",B=["horizontal-tb","lr","lr-tb","rl"].some(function(a){return a===A}),C=["vertical-rl","tb-rl"].some(function(a){return a===A}),D=r(d,0,B,C),E=r(d,1,B,C),F=function(){return 2===E||0===E?v:3===E?x:v+q/2}(),G=function(){return 1===D?y+s/2:5===D?w:y}(),H=[],I=function(a){var b=Math.min,e=Math.max,f=a.getBoundingClientRect(),h=f.height,j=f.width,p=f.top,r=f.right,t=f.bottom,u=f.left,v=getComputedStyle(a),w=parseInt(v.borderLeftWidth,10),x=parseInt(v.borderTopWidth,10),y=parseInt(v.borderRightWidth,10),z=parseInt(v.borderBottomWidth,10),A=0,B=0,C="offsetWidth"in a?a.offsetWidth-a.clientWidth-w-y:0,I="offsetHeight"in a?a.offsetHeight-a.clientHeight-x-z:0;if(g===a){switch(E){case 2:{A=F;break}case 3:{A=F-l;break}case 1:{A=F-l/2;break}case 0:{A=c(o,o+l,l,x,z,o+F,o+F+q,q);break}}switch(D){case 4:{B=G;break}case 5:{B=G-k;break}case 1:{B=G-k/2;break}case 0:{B=c(m,m+k,k,w,y,m+G,m+G+s,s);break}}A=e(0,A+o),B=e(0,B+m)}else{switch(E){case 2:{A=F-p-x;break}case 3:{A=F-t+z+I;break}case 1:{A=F-(p+h/2)+I/2;break}case 0:{A=c(p,t,h,x,z+I,F,F+q,q);break}}switch(D){case 4:{B=G-u-w;break}case 5:{B=G-r+y+C;break}case 1:{B=G-(u+j/2)+C/2;break}case 0:{B=c(u,r,j,w,y+C,G,G+s,s);break}}var J=a.scrollLeft,K=a.scrollTop;A=e(0,b(K+A,a.scrollHeight-h+I)),B=e(0,b(J+B,a.scrollWidth-j+C)),F+=K-A,G+=J-B}H.push(function(){return n(a,i(i({},d),{top:A,left:B}))})};try{for(var J,K=a(h),L=K.next();!L.done;L=K.next())J=L.value,I(J)}catch(a){e={error:a}}finally{try{L&&!L.done&&(f=K.return)&&f.call(K)}finally{if(e)throw e.error}}H.forEach(function(a){return a()})}},w=function(){return void 0===e&&(e=document.documentElement.scrollIntoView),e},x=function(a){var b=w();Element.prototype.scrollIntoView=function(c){if("boolean"==typeof c||c===void 0)return b.call(this,c);if(Object(c)!==c)throw new TypeError("Failed to execute 'scrollIntoView' on 'Element': parameter 1 ('options') is not an object.");return v(this,i(i({},c),a))}},y=function(a){var c=m();Element.prototype.scrollTo=function(){var d=b(arguments,2),e=d[0],f=void 0===e?0:e,g=d[1],h=void 0===g?0:g;if("number"==typeof f&&"number"==typeof h)return c.call(this,f,h);if(Object(f)!==f)throw new TypeError("Failed to execute 'scrollTo' on 'Element': parameter 1 ('options') is not an object.");return n(this,i(i({},f),a))}},z=function(){return void 0===f&&(f=(window.scroll||window.scrollTo).bind(window)),f},A=function(a){var b=z();if(void 0!==a.left||void 0!==a.top){var c=window.scrollX||window.pageXOffset,d=window.scrollY||window.pageYOffset,e=a.left,f=void 0===e?c:e,g=a.top,h=void 0===g?d:g;if("smooth"!==a.behavior)return b(f,h);var i=function(){window.removeEventListener("wheel",m),window.removeEventListener("touchmove",m)},j={timeStamp:k(),duration:a.duration,startX:c,startY:d,targetX:f,targetY:h,rafId:0,method:b,timingFunc:a.timingFunc,callback:i},m=function(){cancelAnimationFrame(j.rafId),i()};window.addEventListener("wheel",m,{passive:!0,once:!0}),window.addEventListener("touchmove",m,{passive:!0,once:!0}),l(j)}},B=function(a){var c=z();window.scroll=function(){var d=b(arguments,2),e=d[0],f=void 0===e?0:e,g=d[1],h=void 0===g?0:g;if("number"==typeof f&&"number"==typeof h)return c.call(this,f,h);if(Object(f)!==f)throw new TypeError("Failed to execute 'scroll' on 'Window': parameter 1 ('options') is not an object.");return A(i(i({},f),a))}},C=function(a){var b=(a.left||0)+(window.scrollX||window.pageXOffset),c=(a.top||0)+(window.scrollY||window.pageYOffset);return"smooth"===a.behavior?A(i(i({},a),{left:b,top:c})):z()(b,c)},D=function(a){var c=function(){return void 0===g&&(g=window.scrollBy.bind(window)),g}();window.scrollBy=function(){var d=b(arguments,2),e=d[0],f=void 0===e?0:e,g=d[1],h=void 0===g?0:g;if("number"==typeof f&&"number"==typeof h)return c.call(this,f,h);if(Object(f)!==f)throw new TypeError("Failed to execute 'scrollBy' on 'Window': parameter 1 ('options') is not an object.");return C(i(i({},f),a))}},E=function(){return void 0===h&&(h=(window.scrollTo||window.scroll).bind(window)),h},F=function(a){var c=E();window.scrollTo=function(){var d=b(arguments,2),e=d[0],f=void 0===e?0:e,g=d[1],h=void 0===g?0:g;if("number"==typeof f&&"number"==typeof h)return c.call(this,f,h);if(Object(f)!==f)throw new TypeError("Failed to execute 'scrollTo' on 'Window': parameter 1 ('options') is not an object.");return A(i(i({},f),a))}},G=function(a){"scrollBehavior"in document.documentElement.style||(B(a),F(a),D(a),o(a),y(a),q(a),x(a))};(function(a){if(a){var b=~~a.dataset.duration;b=0<b?b:void 0,G({duration:b})}})(document.currentScript||document.querySelector("script[data-seamless]"))}); | ||
//# sourceMappingURL=seamless.auto-polyfill.min.js.map |
@@ -34,5 +34,5 @@ (function (global, factory) { | ||
function __values(o) { | ||
var m = typeof Symbol === "function" && o[Symbol.iterator], i = 0; | ||
var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0; | ||
if (m) return m.call(o); | ||
return { | ||
if (o && typeof o.length === "number") return { | ||
next: function () { | ||
@@ -43,2 +43,3 @@ if (o && i >= o.length) o = void 0; | ||
}; | ||
throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); | ||
} | ||
@@ -557,3 +558,3 @@ | ||
Element.prototype.scrollIntoView = function scrollIntoView(arg) { | ||
if (typeof arg === "boolean") { | ||
if (typeof arg === "boolean" || arg === undefined) { | ||
return originalFunc.call(this, arg); | ||
@@ -560,0 +561,0 @@ } |
@@ -487,3 +487,3 @@ (function (global, factory) { | ||
Element.prototype.scrollIntoView = function scrollIntoView(arg) { | ||
if (typeof arg === "boolean") { | ||
if (typeof arg === "boolean" || arg === undefined) { | ||
return originalFunc.call(this, arg); | ||
@@ -490,0 +490,0 @@ } |
@@ -374,3 +374,3 @@ import { elementScroll } from "./Element.scroll.js"; | ||
Element.prototype.scrollIntoView = function scrollIntoView(arg) { | ||
if (typeof arg === "boolean") { | ||
if (typeof arg === "boolean" || arg === undefined) { | ||
return originalFunc.call(this, arg); | ||
@@ -377,0 +377,0 @@ } |
@@ -487,3 +487,3 @@ (function (global, factory) { | ||
Element.prototype.scrollIntoView = function scrollIntoView(arg) { | ||
if (typeof arg === "boolean") { | ||
if (typeof arg === "boolean" || arg === undefined) { | ||
return originalFunc.call(this, arg); | ||
@@ -490,0 +490,0 @@ } |
@@ -5,3 +5,3 @@ { | ||
"description": "Smooth Scroll behavior polyfill", | ||
"version": "1.0.9", | ||
"version": "1.0.10", | ||
"author": { | ||
@@ -20,9 +20,9 @@ "name": "Dustan Kasten", | ||
"devDependencies": { | ||
"prettier": "^1.19.1", | ||
"rollup": "^1.30.0", | ||
"rollup-plugin-babel-minify": "^9.1.1", | ||
"rollup-plugin-typescript2": "^0.25.3", | ||
"ts-node": "^8.6.2", | ||
"tslint": "^6.0.0", | ||
"typescript": "^3.7.5" | ||
"prettier": "^2.0.5", | ||
"rollup": "^2.7.3", | ||
"rollup-plugin-babel-minify": "^10.0.0", | ||
"rollup-plugin-typescript2": "^0.27.0", | ||
"ts-node": "^8.9.1", | ||
"tslint": "^6.1.2", | ||
"typescript": "^3.8.3" | ||
}, | ||
@@ -47,4 +47,4 @@ "main": "dist/es5/seamless.js", | ||
"lint": "tslint \"src/**/*.{js,ts}\"", | ||
"listdiff": "prettier --list-different \"{.,src/**}/*.{ts,js,json,md,*rc}\"", | ||
"format": "prettier --write \"{.,src/**}/*.{ts,js,json,md,*rc}\"" | ||
"listdiff": "prettier --list-different \"src/**/*.ts\" \"*.{js,json,md,*rc}\"", | ||
"format": "prettier --write \"src/**/*.ts\" \"*.{js,json,md,*rc}\"" | ||
}, | ||
@@ -51,0 +51,0 @@ "repository": { |
@@ -10,3 +10,3 @@ import { IAnimationOptions, IContext, IScrollToOptions, now, step } from "./common.js"; | ||
Element.prototype.scrollTo || | ||
function(this: Element, x: number, y: number) { | ||
function (this: Element, x: number, y: number) { | ||
this.scrollLeft = x; | ||
@@ -13,0 +13,0 @@ this.scrollTop = y; |
@@ -521,3 +521,3 @@ import { IAnimationOptions, IScrollIntoViewOptions } from "./common.js"; | ||
Element.prototype.scrollIntoView = function scrollIntoView(arg?: boolean | ScrollIntoViewOptions) { | ||
if (typeof arg === "boolean") { | ||
if (typeof arg === "boolean" || arg === undefined) { | ||
return originalFunc.call(this, arg); | ||
@@ -524,0 +524,0 @@ } |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
473636
4404
1