File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change 28
28
var isDOMPresent = ("document" in this) && !("fake" in this.document);
29
29
30
30
// document.head polyfill for the benefit of Firefox 3.6
31
- document.head = document.head || document.getElementsByTagName('head')[0];
31
+ if (!document.head) {
32
+ document.getElementsByTagName('head')[0];
33
+ }
32
34
33
35
// Typed Arrays: fallback to WebGL arrays or Native JS arrays if unavailable
34
36
function setupTypedArray(name, fallback) {
2072
2074
curElement = typeof aCanvas === "string" ? document.getElementById(aCanvas) : aCanvas;
2073
2075
}
2074
2076
2075
- if (!(curElement instanceof HTMLCanvasElement )) {
2077
+ if (!('getContext' in curElement )) {
2076
2078
throw("called Processing constructor without passing canvas element reference or id.");
2077
2079
}
2078
2080
You can’t perform that action at this time.
0 commit comments