Giter Club home page Giter Club logo

custom-event-polyfill's Introduction

custom-event-polyfill's People

Contributors

andrejpavlovic avatar gbhasha avatar joscha avatar krambuhl avatar kumarharsh avatar reenko avatar shrpne 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  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  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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

custom-event-polyfill's Issues

The automated release is failing 🚨

🚨 The automated release from the master branch failed. 🚨

I recommend you give this issue a high priority, so other packages depending on you could benefit from your bug fixes and new features.

You can find below the list of errors reported by semantic-release. Each one of them has to be resolved in order to automatically publish your package. I’m sure you can resolve this 💪.

Errors are usually caused by a misconfiguration or an authentication problem. With each error reported below you will find explanation and guidance to help you to resolve it.

Once all the errors are resolved, semantic-release will release your package the next time you push a commit to the master branch. You can also manually restart the failed CI job that runs semantic-release.

If you are not sure how to resolve this, here is some links that can help you:

If those don’t help, or if this issue is reporting something you think isn’t right, you can always ask the humans behind semantic-release.


The push permission to the Git repository is required.

semantic-release cannot push the version tag to the branch master on remote Git repository.

Please refer to the authentication configuration documentation to configure the Git credentials on your CI environment.


Good luck with your project ✨

Your semantic-release bot 📦🚀

Safari feature detection fails

The typeof window.CustomEvent === 'function' test returns false for Safari. This Safari bug incorrectly reports constructable types as "object" rather than "function", which causes the polyfill to override Safari's native support for the CustomEvent constructor.

Another way to detect support for the constructor is to call it and trap any resulting errors. This would work around the bug in Safari.

function supported() {
  try {
    var event = new CustomEvent('test', {detail: 'supported'})
    return event.detail === 'supported'
  } catch (error) {
    return false
  }
}

Major Bug - Always overrides native CustomEvent across all browsers

The polyfill test always fails and as a result the browser never uses the native implementation even when it is available.

The issue is with this code:

try {
var ce = new window.CustomEvent('test');
ce.preventDefault();
if (ce.defaultPrevented !== true) {
// IE has problems with .preventDefault() on custom events
// http://stackoverflow.com/questions/23349191
throw new Error('Could not prevent default');
}
} catch(e) {

Instead of

var ce = new window.CustomEvent('test'); 

is should be

var ce = new window.CustomEvent('test', {cancelable: true});

otherwise ce.defaultPrevented always equals to false and the error is always thrown.

IE11 - CustomEvent Polyfill stop triggering events after PDF download

Hi,

As CustomeEvent is not supported in IE11, so added polyfill from MDN and also tested this polyfill.

That is working fine in other browser(Chrome, Firefox) and even IE11 but it stops triggering/listening event after very specific steps. That is download a PDF and trigger "change" event.

Please check demo in IE11/Win7.

Steps to reproduce the bug:

1 - Download PDF

2 - Change Checkbox, it will call native "change" event but CustomEvent does not trigger.

NOTE: Open DevTool's console to visualize console.logs.

Again Demo URL - https://goo.gl/bYYRHf

Also reported this issue at Microsoft's community.

Kindly suggest alternative polyfill/solution/suggestion. Thanks

Add "Usage" section

First, it's not "Useage".
Second, how should one use it?
I suppose something like this (should be in the readme):

require('custom-event-polyfill')
// or
import CustomEvent from 'custom-event-polyfill'

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.