diff --git a/components/script/dom/testbinding.rs b/components/script/dom/testbinding.rs index 95341751780..745a141efe7 100644 --- a/components/script/dom/testbinding.rs +++ b/components/script/dom/testbinding.rs @@ -571,6 +571,8 @@ impl TestBindingMethods for TestBinding { fn FuncControlledAttributeEnabled(&self) -> bool { false } fn FuncControlledMethodDisabled(&self) {} fn FuncControlledMethodEnabled(&self) {} + + fn Panic(&self) { panic!("explicit panic from script") } } impl TestBinding { diff --git a/components/script/dom/webidls/TestBinding.webidl b/components/script/dom/webidls/TestBinding.webidl index cdfb9fd18ae..c8796a024a6 100644 --- a/components/script/dom/webidls/TestBinding.webidl +++ b/components/script/dom/webidls/TestBinding.webidl @@ -455,4 +455,6 @@ interface TestBinding { static void funcControlledStaticMethodEnabled(); [Func="TestBinding::condition_satisfied"] const unsigned short funcControlledConstEnabled = 0; + + void panic(); }; diff --git a/tests/html/panic.html b/tests/html/panic.html new file mode 100644 index 00000000000..d9464846d75 --- /dev/null +++ b/tests/html/panic.html @@ -0,0 +1,16 @@ + + + + + + + + + +