I'm attempting to develop a new website using the Processsingjs library. It works fine in Chrome, but the canvas is showing up blank in Firefox.
I can view processingjs.org just fine through the same install of firefox, just not my website.
The code is bare bones:
<!-- index.html -->
<script src="includes\processing-0.9.7.js"></scrip开发者_如何学Got>
<canvas datasrc="test.pjs" width="700" height="500">text</canvas>
// test.pjs
void setup() {
size(700, 500);
}
void draw() {
background(0);
}
It's worth noting that "text" doesn't show up in Firefox. Can anyone me to troubleshoot? I can't really think of a simpler code.
"includes/processing-0.9.7.js" would be more standard than "includes\processing-0.9.7.js" (ie forward-slash, not back-slash). You need to use a URL, not a Windows path.
精彩评论