Skip to content

Commit 2c03c27

Browse files
Nikola HristovNikola Hristov
authored andcommitted
1 parent a45fe9c commit 2c03c27

File tree

3 files changed

+5
-0
lines changed

3 files changed

+5
-0
lines changed
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
declare module "*.css" {
22
const classes: { [className: string]: string };
3+
34
export = classes;
45
}

generators/app/templates/ext-notebook-renderer/Source/client/index.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,15 +22,18 @@ export const activate: ActivationFunction = (context) => {
2222
return {
2323
renderOutputItem(outputItem, element) {
2424
let shadow = element.shadowRoot;
25+
2526
if (!shadow) {
2627
shadow = element.attachShadow({ mode: "open" });
28+
2729
const root = document.createElement("div");
2830
root.id = "root";
2931
shadow.append(root);
3032
}
3133
const root = shadow.querySelector<HTMLElement>("#root")!;
3234
errorOverlay.wrap(root, () => {
3335
root.innerHTML = "";
36+
3437
const node = document.createElement("div");
3538
root.appendChild(node);
3639

generators/app/templates/ext-notebook-renderer/Source/client/render.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ export function render({ container, mime, value }: IRenderInfo) {
1818
// Replace this with your custom code!
1919
const pre = document.createElement("pre");
2020
pre.classList.add(style.json);
21+
2122
const code = document.createElement("code");
2223
code.textContent = `mime type: ${mime}\n\n${JSON.stringify(value, null, 2)}`;
2324
pre.appendChild(code);

0 commit comments

Comments
 (0)