Register for InstructureCon25 • Passes include access to all sessions, the expo hall, entertainment and networking events, meals, and extraterrestrial encounters.
Found this content helpful? Log in or sign up to leave a like!
Canvas allows for custom javascript to be uploaded, but the main way I can see online for tutorials regarding custom scripts is to use the <button> tag or the <a onclick="function()> which are both banned by canvas.
How do you call on your javascript functions from within a page?
The current goal is to make up for the lack of the immersive reader by calling on the WebReader API within quiz questions and answers when a "Read This" is clicked by students
Yeah, Canvas does block inline JS like onclick for security. What worked for me was adding event listeners in the JS file itself. You can give your "Read This" elements a specific class or data attribute, then use document.querySelectorAll to attach the function after the page loads. That way you're not relying on inline code and it still works with Canvas restrictions.
To interact with Panda Bot in the Instructure Community, you need to sign up or log in:
Sign In