<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>183629</bug_id>
          
          <creation_ts>2018-03-14 05:56:38 -0700</creation_ts>
          <short_desc>Allow extending of event objects</short_desc>
          <delta_ts>2020-04-17 15:03:38 -0700</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>DOM</component>
          <version>Safari Technology Preview</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>CONFIGURATION CHANGED</resolution>
          
          <see_also>https://bugs.webkit.org/show_bug.cgi?id=174313</see_also>
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Jake Archibald">jaffathecake</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>ashvayka</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1406370</commentid>
    <comment_count>0</comment_count>
    <who name="Jake Archibald">jaffathecake</who>
    <bug_when>2018-03-14 05:56:38 -0700</bug_when>
    <thetext>class Foo extends Event {}
console.log(new Foo(&apos;bar&apos;).constructor);

Chrome &amp; Firefox say Foo, Edge &amp; Safari say Event.

The Chrome/Firefox behaviour is preferable, as it allows you to create custom event objects, which is especially useful when developing custom elements.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1406704</commentid>
    <comment_count>1</comment_count>
    <who name="Jake Archibald">jaffathecake</who>
    <bug_when>2018-03-15 10:29:42 -0700</bug_when>
    <thetext>Tests: http://w3c-test.org/dom/events/Event-subclasses-constructors.html</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1503354</commentid>
    <comment_count>2</comment_count>
    <who name="Lucas Forschler">lforschler</who>
    <bug_when>2019-02-06 09:19:17 -0800</bug_when>
    <thetext>Mass move bugs into the DOM component.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1642858</commentid>
    <comment_count>3</comment_count>
    <who name="Alexey Shvayka">ashvayka</who>
    <bug_when>2020-04-17 15:03:38 -0700</bug_when>
    <thetext>(In reply to Jake Archibald from comment #1)
&gt; Tests: http://w3c-test.org/dom/events/Event-subclasses-constructors.html

As of r256716, extending Event (as well as other DOM constructors) works as expected.
Provided test file is 100% passing.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>