Giter VIP home page Giter VIP logo

events-polyfill's Introduction

Hey there

๐Ÿ‘จโ€๐Ÿ’ป About Me :

I am a Senior Front-end Developer from Switzerland.

  • ๐Ÿ”ญ I'm working as a front-end developper and love building web applications, as well as open source libraries.
  • ๐ŸŒฑ I love creating and sharing custom libraries, and I beleave in free open source ecosystems build from thousands of developpers.
  • ๐Ÿ“ซ How to reach me: Linkedin Badge

๐Ÿ”ฅ My biggest achievements so far:

  • ๐Ÿช„ @lirx/core: a reactive library to manage complex data flows with ease.

๐Ÿ› ๏ธ Languages and Tools :

Angularย  CSSย  SASSย  HTMLย  JavaScriptย  Typescriptย  NodeJSย  Denoย  Typescriptย  graphqlย 

events-polyfill's People

Contributors

gaijin99 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

events-polyfill's Issues

Fails in Safari 11.1.2

Loading this polyfill in Safari is giving us an JS console error,

[Error] TypeError: Property description must be an object

Upgrade from 1.1.11 to 2.0.3 breaks angular app

When I load the polyfill in angular (v5.2) app, I get following errors on v2.0.3:

ERROR Error: Event listener type pointerdown on [object Object] is not supported by current environment
    at Object.EventListenerInterceptor.getSupportedEventType (index.js:326)
    at Object.add (index.js:338)
    at HTMLDivElement.target.addEventListener (index.js:179)
    at DomEventsPlugin.addEventListener (platform-browser.js:3328)
    at EventManager.addEventListener (platform-browser.js:2339)
    at EmulatedEncapsulationDomRenderer2.DefaultDomRenderer2.listen (platform-browser.js:2993)
    at BaseAnimationRenderer.listen (animations.js:646)
    at DebugRenderer2.listen (core.js:15433)
    at DownDirective.ngAfterViewInit (down.directive.ts:35)
    at callProviderLifecycles (core.js:12706)
    at callElementProvidersLifecycles (core.js:12673)
    at callLifecycleHooksChildrenFirst (core.js:12656)
    at checkAndUpdateView (core.js:13811)
    at callViewAction (core.js:14153)
    at execEmbeddedViewsAction (core.js:14111)
    at checkAndUpdateView (core.js:13803)
    at callViewAction (core.js:14153)
    at execEmbeddedViewsAction (core.js:14111)
    at checkAndUpdateView (core.js:13803)
    at callViewAction (core.js:14153)
    at execComponentViewsAction (core.js:14085)
    at checkAndUpdateView (core.js:13808)
    at callViewAction (core.js:14153)
    at execEmbeddedViewsAction (core.js:14111)
    at checkAndUpdateView (core.js:13803)
    at callViewAction (core.js:14153)
    at execComponentViewsAction (core.js:14085)
    at checkAndUpdateView (core.js:13808)
    at callViewAction (core.js:14153)
    at execComponentViewsAction (core.js:14085)
    at checkAndUpdateView (core.js:13808)
    at callViewAction (core.js:14153)
    at execEmbeddedViewsAction (core.js:14111)
    at checkAndUpdateView (core.js:13803)
    at callViewAction (core.js:14153)
    at execComponentViewsAction (core.js:14085)
    at checkAndUpdateView (core.js:13808)
    at callWithDebugContext (core.js:15056)
    at Object.debugCheckAndUpdateView [as checkAndUpdateView] (core.js:14593)
    at ViewRef_.detectChanges (core.js:11577)
    at eval (core.js:5907)
    at Array.forEach (<anonymous>)
    at ApplicationRef.tick (core.js:5907)
    at eval (core.js:5740)
    at ZoneDelegate.invoke (zone.js:388)
    at Object.onInvoke (core.js:4749)
    at ZoneDelegate.invoke (zone.js:387)
    at Zone.run (zone.js:138)
    at NgZone.run (core.js:4566)
    at Object.next (core.js:5740)
    at SafeSubscriber.schedulerFn [as _next] (core.js:4331)
    at SafeSubscriber.__tryOrUnsub (Subscriber.js:240)
    at SafeSubscriber.next (Subscriber.js:187)
    at Subscriber._next (Subscriber.js:128)
    at Subscriber.next (Subscriber.js:92)
    at EventEmitter.Subject.next (Subject.js:56)
    at EventEmitter.emit (core.js:4311)
    at checkStable (core.js:4714)
    at onLeave (core.js:4793)
    at Object.onInvokeTask (core.js:4743)
    at ZoneDelegate.invokeTask (zone.js:420)
    at Zone.runTask (zone.js:188)
    at ZoneTask.invokeTask [as invoke] (zone.js:496)
    at invokeTask (zone.js:1517)
    at XMLHttpRequest.globalZoneAwareCallback (zone.js:1543)

Expected behavior:
no runtime errors as on v1.1.11

Unable to get property 'transition' of undefined or null reference

Hi. After doing import 'events-polyfill', I get the following error in IE 11:

TypeError: Unable to get property 'transition' of undefined or null reference
   at EventListenerInterceptor.isSupportedTransitionEvent (http://localhost:3000/packages/modules.js?hash=6078294545688c872c4b6f56253c389881a374dc:1296:5)
   at EventListenerInterceptor.getSupportedEventType (http://localhost:3000/packages/modules.js?hash=6078294545688c872c4b6f56253c389881a374dc:1362:9)
   at add (http://localhost:3000/packages/modules.js?hash=6078294545688c872c4b6f56253c389881a374dc:1380:9)
   at target.prototype.addEventListener (http://localhost:3000/packages/modules.js?hash=6078294545688c872c4b6f56253c389881a374dc:1221:13)
   at ResizeObserverController.prototype.connect_ (http://localhost:3000/packages/modules.js?hash=6078294545688c872c4b6f56253c389881a374dc:78209:5)
   at ResizeObserverController.prototype.addObserver (http://localhost:3000/packages/modules.js?hash=6078294545688c872c4b6f56253c389881a374dc:78128:9)
   at ResizeObserverSPI.prototype.observe (http://localhost:3000/packages/modules.js?hash=6078294

fails to work with dynamically defined handleEvent function

Due to the line here

} else if((typeof listener === 'object') && (typeof listener.handleEvent === 'function')) {

if the handleEvent function is added dynamically (something that i like to do, because this way nobody can rebind it out of its scope), it will not work

I think it's quite safe to drop the check for the function itself. If it's an object, it needs to have a handleEvent, as defined in the addEventListenerApi : it's a function, or an object

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.