diff --git a/Tests/LibWeb/Text/expected/HTML/custom-elements-throw-in-constructor.txt b/Tests/LibWeb/Text/expected/HTML/custom-elements-throw-in-constructor.txt new file mode 100644 index 0000000000..6d6aa3c071 --- /dev/null +++ b/Tests/LibWeb/Text/expected/HTML/custom-elements-throw-in-constructor.txt @@ -0,0 +1,2 @@ + Entered TestElement constructor, throwing. +PASS! (Didn't crash) diff --git a/Tests/LibWeb/Text/input/HTML/custom-elements-throw-in-constructor.html b/Tests/LibWeb/Text/input/HTML/custom-elements-throw-in-constructor.html new file mode 100644 index 0000000000..39481e5093 --- /dev/null +++ b/Tests/LibWeb/Text/input/HTML/custom-elements-throw-in-constructor.html @@ -0,0 +1,20 @@ + + + diff --git a/Userland/Libraries/LibWeb/DOM/Element.cpp b/Userland/Libraries/LibWeb/DOM/Element.cpp index b9306a3c75..886bf5e044 100644 --- a/Userland/Libraries/LibWeb/DOM/Element.cpp +++ b/Userland/Libraries/LibWeb/DOM/Element.cpp @@ -2030,7 +2030,8 @@ JS::ThrowCompletionOr Element::upgrade_element(JS::NonnullGCPtrclear(); // 3. Rethrow the exception (thus terminating this algorithm). return maybe_exception.release_error();