mirror of
https://github.com/livebook-dev/livebook.git
synced 2025-09-06 04:54:29 +08:00
Add setSmartCellEditorIntellisenseNode to iframe (#2230)
This commit is contained in:
parent
b3f7366a8f
commit
1c92311f8d
2 changed files with 10 additions and 2 deletions
|
@ -26,7 +26,7 @@ import { sha256Base64 } from "../../lib/utils";
|
||||||
// (2): https://developer.mozilla.org/en-US/docs/Web/HTML/Element/iframe#attr-sandbox
|
// (2): https://developer.mozilla.org/en-US/docs/Web/HTML/Element/iframe#attr-sandbox
|
||||||
// (3): https://developer.mozilla.org/en-US/docs/Web/Security/Secure_Contexts
|
// (3): https://developer.mozilla.org/en-US/docs/Web/Security/Secure_Contexts
|
||||||
|
|
||||||
const IFRAME_SHA256 = "48LZtKkFYMd+4gsmVvbhvw9mTpJPw+ItRdGxPPs+5xw=";
|
const IFRAME_SHA256 = "wcqj5QWCo66osdAWDnEgPRFyL7nfe8oNqNggnw4vvW8=";
|
||||||
|
|
||||||
export function initializeIframeSource(iframe, iframePort, iframeUrl) {
|
export function initializeIframeSource(iframe, iframePort, iframeUrl) {
|
||||||
const url = getIframeUrl(iframePort, iframeUrl);
|
const url = getIframeUrl(iframePort, iframeUrl);
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html lang="en">
|
<html lang="en">
|
||||||
<head>
|
<head>
|
||||||
<base target="_parent">
|
<base target="_parent" />
|
||||||
<title>Output</title>
|
<title>Output</title>
|
||||||
<style>
|
<style>
|
||||||
html,
|
html,
|
||||||
|
@ -102,6 +102,14 @@
|
||||||
state.secretHandler = callback;
|
state.secretHandler = callback;
|
||||||
postMessage({ type: "selectSecret", preselectName, options });
|
postMessage({ type: "selectSecret", preselectName, options });
|
||||||
},
|
},
|
||||||
|
|
||||||
|
setSmartCellEditorIntellisenseNode(node, cookie) {
|
||||||
|
postMessage({
|
||||||
|
type: "setSmartCellEditorIntellisenseNode",
|
||||||
|
node,
|
||||||
|
cookie,
|
||||||
|
});
|
||||||
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
window.addEventListener("message", (event) => {
|
window.addEventListener("message", (event) => {
|
||||||
|
|
Loading…
Add table
Reference in a new issue