Skip to content

Commit 48c3fc5

Browse files
committed
rebase
1 parent feff6c9 commit 48c3fc5

File tree

2 files changed

+7
-15
lines changed

2 files changed

+7
-15
lines changed

docs/v8-migration-api.md

-2
Original file line numberDiff line numberDiff line change
@@ -1246,8 +1246,6 @@ Other than the changes listed below, `@babel/parser` is affected by all the [AST
12461246
12471247
- Remove methods starting with `_` from `Scope` and `NodePath` ([#16504](https://github.com/babel/babel/pull/16504), [#16705](https://github.com/babel/babel/pull/16705))
12481248
1249-
These methods were meant to be private.
1250-
12511249
```js
12521250
// NodePath.prototype
12531251
_assertUnremoved

js/minirepl.js

+7-13
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/*global ace Babel*/
1+
/*global $ ace Babel*/
22
/*eslint quotes: ["error", "double", { "avoidEscape": true }]*/
33
import debounce from "lodash.debounce";
44

@@ -94,17 +94,11 @@ function simulateKeys(inEditor, outEditor, texts) {
9494

9595
function showError(editor, babelError) {
9696
editor.setValue("");
97-
const replErrorElement = document.querySelector(".hero-repl__error");
98-
if (replErrorElement) {
99-
replErrorElement.textContent = babelError;
100-
replErrorElement.classList.add("hero-repl__error--visible");
101-
}
97+
$(".hero-repl__error").text(babelError).addClass("hero-repl__error--visible");
10298
}
10399

104100
function hideError() {
105-
document
106-
.querySelector(".hero-repl__error")
107-
?.classList.remove("hero-repl__error--visible");
101+
$(".hero-repl__error").removeClass("hero-repl__error--visible");
108102
}
109103

110104
function compileCode(sourceEditor, targetEditor) {
@@ -146,8 +140,8 @@ const BABEL_MINI_REPL = {
146140
// don't init editor on mobile devices
147141
if (isMobile()) return;
148142

149-
document.querySelector(".dummy-hero-repl")?.setAttribute("hidden", true);
150-
document.querySelector(".hero-repl")?.removeAttribute("hidden");
143+
$(".dummy-hero-repl").prop("hidden", true);
144+
$(".hero-repl").prop("hidden", false);
151145

152146
inEditor = setupEditor("hero-repl-in", true);
153147

@@ -163,14 +157,14 @@ const BABEL_MINI_REPL = {
163157
debouncedUpdate();
164158
});
165159

166-
document.getElementById("hero-repl-in")?.addEventListener("click", () => {
160+
$("#hero-repl-in").on("click", function () {
167161
if (runDemo) {
168162
BABEL_MINI_REPL.stopDemo();
169163
}
170164
});
171165

172166
setTimeout(function () {
173-
document.querySelector(".hero-repl")?.classList.add("hero-repl--visible");
167+
$(".hero-repl").addClass("hero-repl--visible");
174168
simulateKeys(inEditor, outEditor, miniReplExamples);
175169
}, 150);
176170
},

0 commit comments

Comments
 (0)