Skip to content
Discussion options

You must be logged in to vote

Hey @axiomtutor! Try document.getElementById("canvas"). That function takes a bare ID name (without the hash symbol), as opposed to a function like querySelector() or querySelectorAll() that takes a CSS selector (including the hash).

I believe OJS cells first run after the DOM is loaded, but I'm not 100% sure (they are Promises, so they do update naturally when their dependent cells update, but I'm not sure whether they re-run when DOM nodes change. My instinct is "probably not") . But there are a couple of other problems:

  • Unnamed OJS cells typically print the thing returned, so if you wrap a chunk in braces (which define a single, multi-statement cell) and run console.log(x) last, you s…

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@mcanouil
Comment options

@axiomtutor
Comment options

Answer selected by axiomtutor
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
ojs-engine Issues with the ojs engine
3 participants