EventTarget constructor does not work

By design Issue #18274176

Details

Author
marc p.
Created
Jul 15, 2018
Privacy
This issue is public.
Found in
  • Microsoft Edge
Found in build #
42.17134
Reports
Reported by 2 people

Sign in to watch or report this issue.

Steps to reproduce

EventTarget constructor does not work, it yields an exception when called:

 SCRIPT5002: Function expected

It’s unbelievable such a basic API still does not work.

Reproducing the issue:

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Event Target Constructor does not work</title>
</head>
<body>
    <script>
    new EventTarget();
     </script>   
</body>
</html>

Attachments

0 attachments

    Comments and activity

    • Microsoft Edge Team

      Changed Assigned To to “Steven K.”

    • Hi Mark,

      I verified the same behavior in 17134.112 and a recent development build.  I.e. The EventTarget() constructor not being supported.

      Thank you for the suggestion. The
      process for feature requests is to use the Feedback Hub or the User
      Voice page

      if you are not using Windows 10.  If you’d like to request that we support it,
      please file request in the Feedback Hub.

       
      I did a search in the Feedback Hub for an existing request and was not able to find anything.  I thought there would be something.  Perhaps my search was not correct?  I recommend adding it.

      Here are the procedures to use Feedback Hub
      app.

       

      1. Go to Start Windows Start icon, enter
        Feedback hub, then select Feedback Hub.
      1. Check to see if someone else has given
        similar feedback by entering the topic.
      1. If you find similar feedback, select it,
        add any details, then select Upvote.
      1. To narrow your search to a specific
        category, perform a search for anything and then you will be able to see the
        “Category” filter selector.
      1. If you don’t find any similar feedback,
        select Add new feedback.
      1. Be sure to select “Microsoft Edge” for
        the category.
      1. Then select the appropriate sub-category.
      1. Enter your feedback (the more details
        the better!), add a screenshot if you can, and you’re done.

       

      Best regards,

      Steve

    • Microsoft Edge Team

      Changed Status to “By design”

    • Hi, I believe this change affect a lot more people then expected. I had to drop my @babel/plugin-transform-classes solution and refactor my code to use delegate instead of extending directly EventTarget (which was working fine in Chrome & Firefox). Also I notice that I can’t extend Event and add method to my new parent class, which again work fine in Chrome and Firefox.

      In hope that microsoft fix this asap.

      Thanks,

      Guillaume

    • I would also appreciate addition of the feature (being able to extend EventTarget class).
      Cheers,
      Mitar

    You need to sign in to your Microsoft account to add a comment.

    Sign in