parser icon indicating copy to clipboard operation
parser copied to clipboard

Add Event to globals

Open mootari opened this issue 2 months ago • 0 comments

Adds Event to the list of known globals.

Currently a cell that references the Event constructor will have Event declared as input:

function _1(md){return(
md`# Untitled`
)}

function _2(Event){return(
new Event("input")
)}

function _3(){return(
new CustomEvent("input")
)}

export default function define(runtime, observer) {
  const main = runtime.module();
  main.variable(observer()).define(["md"], _1);
  main.variable(observer()).define(["Event"], _2);
  main.variable(observer()).define(_3);
  return main;
}

mootari avatar Dec 11 '24 22:12 mootari