Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Event to globals #214

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Add Event to globals #214

wants to merge 1 commit into from

Conversation

mootari
Copy link
Member

@mootari mootari commented Dec 11, 2024

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 mootari requested a review from mbostock December 11, 2024 22:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant