We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 5e37751 commit 270fdccCopy full SHA for 270fdcc
observer/index.html
@@ -36,11 +36,15 @@
36
></iframe>
37
</div>
38
<script>
39
- document.querySelectorAll(".terminal").forEach((terminal) => {
40
- const viewport =
41
- terminal.contentWindow.document.querySelector(".xterm-viewport");
42
- if (!viewport) return;
43
- viewport.style.overflow = "hidden";
+ document.querySelectorAll(".terminal").forEach((terminalIFrame) => {
+ terminalIFrame.addEventListener("load", () => {
+ const styleSheet =
+ terminalIFrame.contentWindow.document.styleSheets[0];
+ styleSheet.insertRule(
44
+ ".xterm-viewport { overflow: hidden !important; }",
45
+ styleSheet.cssRules.length
46
+ );
47
+ });
48
});
49
</script>
50
</body>
0 commit comments