Skip to content

Commit bb7e865

Browse files
committed
Adapt wasm-pack new response
1 parent f49d0cc commit bb7e865

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

src/theme/book.js

+5-3
Original file line numberDiff line numberDiff line change
@@ -181,9 +181,9 @@ function playground_text(playground) {
181181
body: JSON.stringify(params)
182182
})
183183
.then(response => response.json())
184-
.then(({ wasm_js, wasm_bg, error }) => {
185-
if (error) {
186-
throw new Error(error);
184+
.then(({ wasm_js, wasm_bg, success, stderr }) => {
185+
if (!success) {
186+
throw new Error(stderr);
187187
}
188188

189189
return {
@@ -238,11 +238,13 @@ function playground_text(playground) {
238238

239239
function createIFrame(src) {
240240
var iframe = document.createElement('iframe');
241+
iframe.scrolling = 'no';
241242
iframe.style.height = "100%";
242243
iframe.style.width = "100%";
243244
iframe.style.padding = 0;
244245
iframe.style.margin = 0;
245246
iframe.style.border = 0;
247+
iframe.style.overflow = "hidden";
246248
iframe.src = createObjectURL(src, "text/html");
247249
return iframe
248250
}

0 commit comments

Comments
 (0)