<?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>195556</bug_id>
          
          <creation_ts>2019-03-11 07:59:15 -0700</creation_ts>
          <short_desc>Unable to extend the DocumentFragment class</short_desc>
          <delta_ts>2020-04-17 14:45:14 -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>Mac</rep_platform>
          <op_sys>macOS 10.14</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="Andrea Giammarchi">andrea.giammarchi</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>1514766</commentid>
    <comment_count>0</comment_count>
    <who name="Andrea Giammarchi">andrea.giammarchi</who>
    <bug_when>2019-03-11 07:59:15 -0700</bug_when>
    <thetext>The following code will fail the assertion that would, otherwise, pass in every other browser that implements classes.

(function () {&apos;use strict&apos;;
  class WaitWhat extends DocumentFragment {}
  console.assert(
    (new WaitWhat) instanceof WaitWhat,
    `any instance of a DocumentFragment extend fails`
  );
}());

This is true even through Reflect.construct

(function () {&apos;use strict&apos;;
  class WaitWhat extends DocumentFragment {}
  console.assert(
    Reflect.construct(DocumentFragment, [], WaitWhat) instanceof WaitWhat,
    `any instance of a DocumentFragment extend fails`
  );
}());

The expected behavior is that it is possible to extend the DocumentFragment as any other built-in class.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1642852</commentid>
    <comment_count>1</comment_count>
    <who name="Alexey Shvayka">ashvayka</who>
    <bug_when>2020-04-17 14:45:14 -0700</bug_when>
    <thetext>As of r256716, extending DocumentFragment (as well as other DOM constructors) works as expected.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>