I have a stupid idea to try and make a program that won't be blocked on any computer since it will be embedded in a PDF (I heard Javascript can run in PDFs). It will run HTML5 and Javascript (and a little bit of CSS) in PDF files, mainly using the canvas
element in HTML5 and WebGL in Javascript. Is this possible?
No.
PDFs can embed JS in the same way as HTML.
PDFs cannot embed HTML. They have nothing equivalent to canvas elements.