mirror of
https://github.com/rstudio/shiny.git
synced 2026-01-09 15:08:04 -05:00
10 lines
317 B
TypeScript
10 lines
317 B
TypeScript
import { indirectEval } from "../src/utils/eval";
|
|
|
|
// Listen for messages from parent frame. This file is only added when the
|
|
// shiny.testmode option is TRUE.
|
|
window.addEventListener("message", function (e: { data: { code: string } }) {
|
|
const message = e.data;
|
|
|
|
if (message.code) indirectEval(message.code);
|
|
});
|