From e2706840532c0ce9c4fc25832e810ad4f9823b61 Mon Sep 17 00:00:00 2001 From: David DeSandro Date: Tue, 29 Jan 2019 16:00:36 -0500 Subject: [PATCH] =?UTF-8?q?=F0=9F=91=B7=20build=20v2.2.0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- css/flickity.css | 2 +- dist/flickity.css | 4 +- dist/flickity.min.css | 4 +- dist/flickity.pkgd.js | 298 ++++++++++++++------------------------ dist/flickity.pkgd.min.js | 5 +- js/index.js | 2 +- package.json | 2 +- 7 files changed, 115 insertions(+), 202 deletions(-) diff --git a/css/flickity.css b/css/flickity.css index dfae38f6..7f8acc8c 100644 --- a/css/flickity.css +++ b/css/flickity.css @@ -1,4 +1,4 @@ -/*! Flickity v2.1.2 +/*! Flickity v2.2.0 https://flickity.metafizzy.co ---------------------------------------------- */ diff --git a/dist/flickity.css b/dist/flickity.css index 34b2eafb..7f8acc8c 100644 --- a/dist/flickity.css +++ b/dist/flickity.css @@ -1,4 +1,4 @@ -/*! Flickity v2.1.2 +/*! Flickity v2.2.0 https://flickity.metafizzy.co ---------------------------------------------- */ @@ -73,7 +73,7 @@ https://flickity.metafizzy.co } .flickity-button-icon { - fill: #333; + fill: currentColor; } /* ---- previous/next buttons ---- */ diff --git a/dist/flickity.min.css b/dist/flickity.min.css index 2d1ac944..610880c9 100644 --- a/dist/flickity.min.css +++ b/dist/flickity.min.css @@ -1,4 +1,4 @@ -/*! Flickity v2.1.2 +/*! Flickity v2.2.0 https://flickity.metafizzy.co ---------------------------------------------- */ -.flickity-enabled{position:relative}.flickity-enabled:focus{outline:0}.flickity-viewport{overflow:hidden;position:relative;height:100%}.flickity-slider{position:absolute;width:100%;height:100%}.flickity-enabled.is-draggable{-webkit-tap-highlight-color:transparent;tap-highlight-color:transparent;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.flickity-enabled.is-draggable .flickity-viewport{cursor:move;cursor:-webkit-grab;cursor:grab}.flickity-enabled.is-draggable .flickity-viewport.is-pointer-down{cursor:-webkit-grabbing;cursor:grabbing}.flickity-button{position:absolute;background:hsla(0,0%,100%,.75);border:none;color:#333}.flickity-button:hover{background:#fff;cursor:pointer}.flickity-button:focus{outline:0;box-shadow:0 0 0 5px #19f}.flickity-button:active{opacity:.6}.flickity-button:disabled{opacity:.3;cursor:auto;pointer-events:none}.flickity-button-icon{fill:#333}.flickity-prev-next-button{top:50%;width:44px;height:44px;border-radius:50%;transform:translateY(-50%)}.flickity-prev-next-button.previous{left:10px}.flickity-prev-next-button.next{right:10px}.flickity-rtl .flickity-prev-next-button.previous{left:auto;right:10px}.flickity-rtl .flickity-prev-next-button.next{right:auto;left:10px}.flickity-prev-next-button .flickity-button-icon{position:absolute;left:20%;top:20%;width:60%;height:60%}.flickity-page-dots{position:absolute;width:100%;bottom:-25px;padding:0;margin:0;list-style:none;text-align:center;line-height:1}.flickity-rtl .flickity-page-dots{direction:rtl}.flickity-page-dots .dot{display:inline-block;width:10px;height:10px;margin:0 8px;background:#333;border-radius:50%;opacity:.25;cursor:pointer}.flickity-page-dots .dot.is-selected{opacity:1} \ No newline at end of file +.flickity-enabled{position:relative}.flickity-enabled:focus{outline:0}.flickity-viewport{overflow:hidden;position:relative;height:100%}.flickity-slider{position:absolute;width:100%;height:100%}.flickity-enabled.is-draggable{-webkit-tap-highlight-color:transparent;tap-highlight-color:transparent;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.flickity-enabled.is-draggable .flickity-viewport{cursor:move;cursor:-webkit-grab;cursor:grab}.flickity-enabled.is-draggable .flickity-viewport.is-pointer-down{cursor:-webkit-grabbing;cursor:grabbing}.flickity-button{position:absolute;background:hsla(0,0%,100%,.75);border:none;color:#333}.flickity-button:hover{background:#fff;cursor:pointer}.flickity-button:focus{outline:0;box-shadow:0 0 0 5px #19F}.flickity-button:active{opacity:.6}.flickity-button:disabled{opacity:.3;cursor:auto;pointer-events:none}.flickity-button-icon{fill:currentColor}.flickity-prev-next-button{top:50%;width:44px;height:44px;border-radius:50%;transform:translateY(-50%)}.flickity-prev-next-button.previous{left:10px}.flickity-prev-next-button.next{right:10px}.flickity-rtl .flickity-prev-next-button.previous{left:auto;right:10px}.flickity-rtl .flickity-prev-next-button.next{right:auto;left:10px}.flickity-prev-next-button .flickity-button-icon{position:absolute;left:20%;top:20%;width:60%;height:60%}.flickity-page-dots{position:absolute;width:100%;bottom:-25px;padding:0;margin:0;list-style:none;text-align:center;line-height:1}.flickity-rtl .flickity-page-dots{direction:rtl}.flickity-page-dots .dot{display:inline-block;width:10px;height:10px;margin:0 8px;background:#333;border-radius:50%;opacity:.25;cursor:pointer}.flickity-page-dots .dot.is-selected{opacity:1} \ No newline at end of file diff --git a/dist/flickity.pkgd.js b/dist/flickity.pkgd.js index 78322f69..dfe794dc 100644 --- a/dist/flickity.pkgd.js +++ b/dist/flickity.pkgd.js @@ -1,5 +1,5 @@ /*! - * Flickity PACKAGED v2.1.2 + * Flickity PACKAGED v2.2.0 * Touch, responsive, flickable carousels * * Licensed GPLv3 for open source use @@ -811,16 +811,16 @@ var proto = Cell.prototype; proto.create = function() { this.element.style.position = 'absolute'; - this.element.setAttribute( 'aria-selected', 'false' ); + this.element.setAttribute( 'aria-hidden', 'true' ); this.x = 0; this.shift = 0; }; proto.destroy = function() { // reset style + this.unselect(); this.element.style.position = ''; var side = this.parent.originSide; - this.element.removeAttribute('aria-selected'); this.element.style[ side ] = ''; }; @@ -847,6 +847,16 @@ proto.renderPosition = function( x ) { this.element.style[ side ] = this.parent.getPositionValue( x ); }; +proto.select = function() { + this.element.classList.add('is-selected'); + this.element.removeAttribute('aria-hidden'); +}; + +proto.unselect = function() { + this.element.classList.remove('is-selected'); + this.element.setAttribute( 'aria-hidden', 'true' ); +}; + /** * @param {Integer} factor - 0, 1, or -1 **/ @@ -917,18 +927,14 @@ proto.getLastCell = function() { }; proto.select = function() { - this.changeSelected( true ); + this.cells.forEach( function( cell ) { + cell.select(); + }); }; proto.unselect = function() { - this.changeSelected( false ); -}; - -proto.changeSelected = function( isSelected ) { - var classMethod = isSelected ? 'add' : 'remove'; this.cells.forEach( function( cell ) { - cell.element.classList[ classMethod ]('is-selected'); - cell.element.setAttribute( 'aria-selected', isSelected.toString() ); + cell.unselect(); }); }; @@ -1013,22 +1019,29 @@ proto.positionSlider = function() { this.shiftWrapCells( x ); } - x = x + this.cursorPosition; + this.setTranslateX( x, this.isAnimating ); + this.dispatchScrollEvent(); +}; + +proto.setTranslateX = function( x, is3d ) { + x += this.cursorPosition; // reverse if right-to-left and using transform x = this.options.rightToLeft ? -x : x; - var value = this.getPositionValue( x ); + var translateX = this.getPositionValue( x ); // use 3D tranforms for hardware acceleration on iOS // but use 2D when settled, for better font-rendering - this.slider.style.transform = this.isAnimating ? - 'translate3d(' + value + ',0,0)' : 'translateX(' + value + ')'; + this.slider.style.transform = is3d ? + 'translate3d(' + translateX + ',0,0)' : 'translateX(' + translateX + ')'; +}; - // scroll event +proto.dispatchScrollEvent = function() { var firstSlide = this.slides[0]; - if ( firstSlide ) { - var positionX = -this.x - firstSlide.target; - var progress = positionX / this.slidesWidth; - this.dispatchEvent( 'scroll', null, [ progress, positionX ] ); + if ( !firstSlide ) { + return; } + var positionX = -this.x - firstSlide.target; + var progress = positionX / this.slidesWidth; + this.dispatchEvent( 'scroll', null, [ progress, positionX ] ); }; proto.positionSliderAtSelected = function() { @@ -1331,18 +1344,7 @@ proto.activate = function() { } this.emitEvent('activate'); - - var index; - var initialIndex = this.options.initialIndex; - if ( this.isInitActivated ) { - index = this.selectedIndex; - } else if ( initialIndex !== undefined ) { - index = this.cells[ initialIndex ] ? initialIndex : 0; - } else { - index = 0; - } - // select instantly - this.select( index, false, true ); + this.selectInitialIndex(); // flag for initial activation, for using initialIndex this.isInitActivated = true; // ready event. #493 @@ -1742,6 +1744,31 @@ proto.unselectSelectedSlide = function() { } }; +proto.selectInitialIndex = function() { + var initialIndex = this.options.initialIndex; + // already activated, select previous selectedIndex + if ( this.isInitActivated ) { + this.select( this.selectedIndex, false, true ); + return; + } + // select with selector string + if ( initialIndex && typeof initialIndex == 'string' ) { + var cell = this.queryCell( initialIndex ); + if ( cell ) { + this.selectCell( initialIndex, false, true ); + return; + } + } + + var index = 0; + // select with number + if ( initialIndex && this.slides[ initialIndex ] ) { + index = initialIndex; + } + // select instantly + this.select( index, false, true ); +}; + /** * select slide from number or cell element * @param {Element or Number} elem @@ -1866,6 +1893,10 @@ proto.queryCell = function( selector ) { return this.cells[ selector ]; } if ( typeof selector == 'string' ) { + // do not select invalid selectors from hash: #123, #/. #791 + if ( selector.match(/^[#\.]?[\d\/]/) ) { + return; + } // use string as selector, get element selector = this.element.querySelector( selector ); } @@ -1879,8 +1910,13 @@ proto.uiChange = function() { this.emitEvent('uiChange'); }; +// keep focus on element when child UI elements are clicked proto.childUIPointerDown = function( event ) { - this.emitEvent( 'childUIPointerDown', [ event ] ); + // HACK iOS does not allow touch events to bubble up?! + if ( event.type != 'touchstart' ) { + event.preventDefault(); + } + this.focus(); }; // ----- resize ----- // @@ -2000,6 +2036,7 @@ proto.deactivate = function() { proto.destroy = function() { this.deactivate(); window.removeEventListener( 'resize', this ); + this.allOff(); this.emitEvent('destroy'); if ( jQuery && this.$element ) { jQuery.removeData( this.element, 'flickity' ); @@ -2037,6 +2074,7 @@ Flickity.setJQuery = function( jq ) { }; Flickity.Cell = Cell; +Flickity.Slide = Slide; return Flickity; @@ -2684,7 +2722,6 @@ var isTouchmoveScrollCanceled = false; proto._createDrag = function() { this.on( 'activate', this.onActivateDrag ); this.on( 'uiChange', this._uiChangeDrag ); - this.on( 'childUIPointerDown', this._childUIPointerDownDrag ); this.on( 'deactivate', this.onDeactivateDrag ); this.on( 'cellChange', this.updateDraggable ); // TODO updateDraggable on resize? if groupCells & slides change @@ -2736,13 +2773,6 @@ proto._uiChangeDrag = function() { delete this.isFreeScrolling; }; -proto._childUIPointerDownDrag = function( event ) { - // allow focus & preventDefault even when not draggable - // so child UI elements keep focus on carousel. #721 - event.preventDefault(); - this.pointerDownFocus( event ); -}; - // -------------------------- pointer events -------------------------- // proto.pointerDown = function( event, pointer ) { @@ -2776,7 +2806,11 @@ proto.pointerDown = function( event, pointer ) { // default pointerDown logic, used for staticClick proto._pointerDownDefault = function( event, pointer ) { // track start event position - this.pointerDownPointer = pointer; + // Safari 9 overrides pageX and pageY. These values needs to be copied. #779 + this.pointerDownPointer = { + pageX: pointer.pageX, + pageY: pointer.pageY, + }; // bind move and end events this._bindPostStartEvents( event ); this.dispatchEvent( 'pointerDown', event, [ pointer ] ); @@ -3022,120 +3056,6 @@ return Flickity; })); -/*! - * Tap listener v2.0.0 - * listens to taps - * MIT license - */ - -/*jshint browser: true, unused: true, undef: true, strict: true */ - -( function( window, factory ) { - // universal module definition - /*jshint strict: false*/ /*globals define, module, require */ - - if ( typeof define == 'function' && define.amd ) { - // AMD - define( 'tap-listener/tap-listener',[ - 'unipointer/unipointer' - ], function( Unipointer ) { - return factory( window, Unipointer ); - }); - } else if ( typeof module == 'object' && module.exports ) { - // CommonJS - module.exports = factory( - window, - require('unipointer') - ); - } else { - // browser global - window.TapListener = factory( - window, - window.Unipointer - ); - } - -}( window, function factory( window, Unipointer ) { - - - -// -------------------------- TapListener -------------------------- // - -function TapListener( elem ) { - this.bindTap( elem ); -} - -// inherit Unipointer & EventEmitter -var proto = TapListener.prototype = Object.create( Unipointer.prototype ); - -/** - * bind tap event to element - * @param {Element} elem - */ -proto.bindTap = function( elem ) { - if ( !elem ) { - return; - } - this.unbindTap(); - this.tapElement = elem; - this._bindStartEvent( elem, true ); -}; - -proto.unbindTap = function() { - if ( !this.tapElement ) { - return; - } - this._bindStartEvent( this.tapElement, true ); - delete this.tapElement; -}; - -/** - * pointer up - * @param {Event} event - * @param {Event or Touch} pointer - */ -proto.pointerUp = function( event, pointer ) { - // ignore emulated mouse up clicks - if ( this.isIgnoringMouseUp && event.type == 'mouseup' ) { - return; - } - - var pointerPoint = Unipointer.getPointerPoint( pointer ); - var boundingRect = this.tapElement.getBoundingClientRect(); - var scrollX = window.pageXOffset; - var scrollY = window.pageYOffset; - // calculate if pointer is inside tapElement - var isInside = pointerPoint.x >= boundingRect.left + scrollX && - pointerPoint.x <= boundingRect.right + scrollX && - pointerPoint.y >= boundingRect.top + scrollY && - pointerPoint.y <= boundingRect.bottom + scrollY; - // trigger callback if pointer is inside element - if ( isInside ) { - this.emitEvent( 'tap', [ event, pointer ] ); - } - - // set flag for emulated clicks 300ms after touchend - if ( event.type != 'mouseup' ) { - this.isIgnoringMouseUp = true; - // reset flag after 300ms - var _this = this; - setTimeout( function() { - delete _this.isIgnoringMouseUp; - }, 400 ); - } -}; - -proto.destroy = function() { - this.pointerDone(); - this.unbindTap(); -}; - -// ----- ----- // - -return TapListener; - -})); - // prev/next buttons ( function( window, factory ) { // universal module definition @@ -3144,17 +3064,17 @@ return TapListener; // AMD define( 'flickity/js/prev-next-button',[ './flickity', - 'tap-listener/tap-listener', + 'unipointer/unipointer', 'fizzy-ui-utils/utils' - ], function( Flickity, TapListener, utils ) { - return factory( window, Flickity, TapListener, utils ); + ], function( Flickity, Unipointer, utils ) { + return factory( window, Flickity, Unipointer, utils ); }); } else if ( typeof module == 'object' && module.exports ) { // CommonJS module.exports = factory( window, require('./flickity'), - require('tap-listener'), + require('unipointer'), require('fizzy-ui-utils') ); } else { @@ -3162,12 +3082,12 @@ return TapListener; factory( window, window.Flickity, - window.TapListener, + window.Unipointer, window.fizzyUIUtils ); } -}( window, function factory( window, Flickity, TapListener, utils ) { +}( window, function factory( window, Flickity, Unipointer, utils ) { 'use strict'; var svgURI = 'http://www.w3.org/2000/svg'; @@ -3180,7 +3100,7 @@ function PrevNextButton( direction, parent ) { this._create(); } -PrevNextButton.prototype = Object.create( TapListener.prototype ); +PrevNextButton.prototype = Object.create( Unipointer.prototype ); PrevNextButton.prototype._create = function() { // properties @@ -3203,14 +3123,12 @@ PrevNextButton.prototype._create = function() { var svg = this.createSVG(); element.appendChild( svg ); // events - this.on( 'tap', this.onTap ); this.parent.on( 'select', this.update.bind( this ) ); this.on( 'pointerDown', this.parent.childUIPointerDown.bind( this.parent ) ); }; PrevNextButton.prototype.activate = function() { - this.bindTap( this.element ); - // click events from keyboard + this.bindStartEvent( this.element ); this.element.addEventListener( 'click', this ); // add to DOM this.parent.element.appendChild( this.element ); @@ -3219,9 +3137,8 @@ PrevNextButton.prototype.activate = function() { PrevNextButton.prototype.deactivate = function() { // remove from DOM this.parent.element.removeChild( this.element ); - // do regular TapListener destroy - TapListener.prototype.destroy.call( this ); - // click events from keyboard + // click events + this.unbindStartEvent( this.element ); this.element.removeEventListener( 'click', this ); }; @@ -3257,7 +3174,9 @@ function getArrowMovements( shape ) { ' Z'; } -PrevNextButton.prototype.onTap = function() { +PrevNextButton.prototype.handleEvent = utils.handleEvent; + +PrevNextButton.prototype.onclick = function() { if ( !this.isEnabled ) { return; } @@ -3266,16 +3185,6 @@ PrevNextButton.prototype.onTap = function() { this.parent[ method ](); }; -PrevNextButton.prototype.handleEvent = utils.handleEvent; - -PrevNextButton.prototype.onclick = function( event ) { - // only allow clicks from keyboard - var focused = document.activeElement; - if ( focused && focused == this.element ) { - this.onTap( event, event ); - } -}; - // ----- ----- // PrevNextButton.prototype.enable = function() { @@ -3310,6 +3219,7 @@ PrevNextButton.prototype.update = function() { PrevNextButton.prototype.destroy = function() { this.deactivate(); + this.allOff(); }; // -------------------------- Flickity prototype -------------------------- // @@ -3366,17 +3276,17 @@ return Flickity; // AMD define( 'flickity/js/page-dots',[ './flickity', - 'tap-listener/tap-listener', + 'unipointer/unipointer', 'fizzy-ui-utils/utils' - ], function( Flickity, TapListener, utils ) { - return factory( window, Flickity, TapListener, utils ); + ], function( Flickity, Unipointer, utils ) { + return factory( window, Flickity, Unipointer, utils ); }); } else if ( typeof module == 'object' && module.exports ) { // CommonJS module.exports = factory( window, require('./flickity'), - require('tap-listener'), + require('unipointer'), require('fizzy-ui-utils') ); } else { @@ -3384,12 +3294,12 @@ return Flickity; factory( window, window.Flickity, - window.TapListener, + window.Unipointer, window.fizzyUIUtils ); } -}( window, function factory( window, Flickity, TapListener, utils ) { +}( window, function factory( window, Flickity, Unipointer, utils ) { // -------------------------- PageDots -------------------------- // @@ -3400,7 +3310,7 @@ function PageDots( parent ) { this._create(); } -PageDots.prototype = new TapListener(); +PageDots.prototype = Object.create( Unipointer.prototype ); PageDots.prototype._create = function() { // create holder element @@ -3409,21 +3319,23 @@ PageDots.prototype._create = function() { // create dots, array of elements this.dots = []; // events - this.on( 'tap', this.onTap ); + this.handleClick = this.onClick.bind( this ); this.on( 'pointerDown', this.parent.childUIPointerDown.bind( this.parent ) ); }; PageDots.prototype.activate = function() { this.setDots(); - this.bindTap( this.holder ); + this.holder.addEventListener( 'click', this.handleClick ); + this.bindStartEvent( this.holder ); // add to DOM this.parent.element.appendChild( this.holder ); }; PageDots.prototype.deactivate = function() { + this.holder.removeEventListener( 'click', this.handleClick ); + this.unbindStartEvent( this.holder ); // remove from DOM this.parent.element.removeChild( this.holder ); - TapListener.prototype.destroy.call( this ); }; PageDots.prototype.setDots = function() { @@ -3478,7 +3390,8 @@ PageDots.prototype.updateSelected = function() { this.selectedDot.setAttribute( 'aria-current', 'step' ); }; -PageDots.prototype.onTap = function( event ) { +PageDots.prototype.onTap = // old method name, backwards-compatible +PageDots.prototype.onClick = function( event ) { var target = event.target; // only care about dot clicks if ( target.nodeName != 'LI' ) { @@ -3492,6 +3405,7 @@ PageDots.prototype.onTap = function( event ) { PageDots.prototype.destroy = function() { this.deactivate(); + this.allOff(); }; Flickity.PageDots = PageDots; @@ -4033,7 +3947,7 @@ return Flickity; })); /*! - * Flickity v2.1.2 + * Flickity v2.2.0 * Touch, responsive, flickable carousels * * Licensed GPLv3 for open source use diff --git a/dist/flickity.pkgd.min.js b/dist/flickity.pkgd.min.js index e9dac247..d40f78b4 100644 --- a/dist/flickity.pkgd.min.js +++ b/dist/flickity.pkgd.min.js @@ -1,5 +1,5 @@ /*! - * Flickity PACKAGED v2.1.2 + * Flickity PACKAGED v2.2.0 * Touch, responsive, flickable carousels * * Licensed GPLv3 for open source use @@ -9,5 +9,4 @@ * Copyright 2015-2018 Metafizzy */ -!function(t,e){"function"==typeof define&&define.amd?define("jquery-bridget/jquery-bridget",["jquery"],function(i){return e(t,i)}):"object"==typeof module&&module.exports?module.exports=e(t,require("jquery")):t.jQueryBridget=e(t,t.jQuery)}(window,function(t,e){"use strict";function i(i,o,a){function l(t,e,n){var s,o="$()."+i+'("'+e+'")';return t.each(function(t,l){var h=a.data(l,i);if(!h)return void r(i+" not initialized. Cannot call methods, i.e. "+o);var c=h[e];if(!c||"_"==e.charAt(0))return void r(o+" is not a valid method");var d=c.apply(h,n);s=void 0===s?d:s}),void 0!==s?s:t}function h(t,e){t.each(function(t,n){var s=a.data(n,i);s?(s.option(e),s._init()):(s=new o(n,e),a.data(n,i,s))})}a=a||e||t.jQuery,a&&(o.prototype.option||(o.prototype.option=function(t){a.isPlainObject(t)&&(this.options=a.extend(!0,this.options,t))}),a.fn[i]=function(t){if("string"==typeof t){var e=s.call(arguments,1);return l(this,t,e)}return h(this,t),this},n(a))}function n(t){!t||t&&t.bridget||(t.bridget=i)}var s=Array.prototype.slice,o=t.console,r="undefined"==typeof o?function(){}:function(t){o.error(t)};return n(e||t.jQuery),i}),function(t,e){"function"==typeof define&&define.amd?define("ev-emitter/ev-emitter",e):"object"==typeof module&&module.exports?module.exports=e():t.EvEmitter=e()}("undefined"!=typeof window?window:this,function(){function t(){}var e=t.prototype;return e.on=function(t,e){if(t&&e){var i=this._events=this._events||{},n=i[t]=i[t]||[];return n.indexOf(e)==-1&&n.push(e),this}},e.once=function(t,e){if(t&&e){this.on(t,e);var i=this._onceEvents=this._onceEvents||{},n=i[t]=i[t]||{};return n[e]=!0,this}},e.off=function(t,e){var i=this._events&&this._events[t];if(i&&i.length){var n=i.indexOf(e);return n!=-1&&i.splice(n,1),this}},e.emitEvent=function(t,e){var i=this._events&&this._events[t];if(i&&i.length){i=i.slice(0),e=e||[];for(var n=this._onceEvents&&this._onceEvents[t],s=0;s