tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

windowproxy-prevent-extensions.html (633B)


      1 <!DOCTYPE html>
      2 <meta charset="utf-8">
      3 <title>[[PreventExtensions]] on a WindowProxy object should return false</title>
      4 <link rel="help" href="https://html.spec.whatwg.org/multipage/window-object.html#windowproxy-preventextensions">
      5 
      6 <script src="/resources/testharness.js"></script>
      7 <script src="/resources/testharnessreport.js"></script>
      8 
      9 <script>
     10 "use strict";
     11 
     12 test(() => {
     13  assert_throws_js(TypeError, () => {
     14    Object.preventExtensions(window);
     15  });
     16 }, "Object.preventExtensions throws a TypeError");
     17 
     18 test(() => {
     19  assert_false(Reflect.preventExtensions(window));
     20 }, "Reflect.preventExtensions returns false");
     21 </script>