Skip to content

Commit 3e9f066

Browse files
fix firefox, add decorator
1 parent 32b2e94 commit 3e9f066

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

devtools.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@
1717
}
1818
}
1919
</script>
20-
<link rel="modulepreload" href="./src/late-panels.mjs" as="script" />
21-
<link rel="modulepreload" href="./src/262_worker.mjs" as="script" />
20+
<link rel="modulepreload" href="./src/devtools/late-panels.mjs" as="script" />
21+
<link rel="modulepreload" href="./src/devtools/262_worker.mjs" as="script" />
2222
<meta
2323
http-equiv="Content-Security-Policy"
2424
content="object-src 'none'; script-src 'self' 'sha256-YCezwjqZIYZtHaYW1WJzVCeRrxO0ie1Wg6rRb3iSlno=' https://chrome-devtools-frontend.appspot.com https://cdn.jsdelivr.net/ https://engine262.js.org/"

src/devtools/index.mjs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,9 @@ import { FEATURES } from '../../lib/engine262.mjs';
1515

1616
// Fix crash on Firefox (non standard / unsupported api used)
1717
ShadowRoot.prototype.getSelection = ShadowRoot.prototype.getComponentSelection;
18+
ShadowRoot.prototype.getBoundingClientRect = function () {
19+
return this.host.getBoundingClientRect();
20+
};
1821
Element.prototype.scrollIntoViewIfNeeded = Element.prototype.scrollIntoView;
1922

2023
// @ts-ignore
@@ -28,6 +31,9 @@ if (localStorage.getItem('console-show-settings-toolbar') === null) {
2831
if (localStorage.getItem('experiments') === null) {
2932
localStorage.setItem('experiments', '{"protocol-monitor":true}');
3033
}
34+
if (localStorage.getItem('engine262:decorators') === null) {
35+
localStorage.setItem('engine262:decorators', 'true');
36+
}
3137
// #endregion
3238

3339
// #region i18n

0 commit comments

Comments
 (0)