Skip to content

Commit 245c22f

Browse files
authored
Wrap the created localCanvas element with the cc.$ class
.addClass(...) is called on it a few lines later, which throws an error if localCanvas is a regular HTML element.
1 parent c901b28 commit 245c22f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

CCBoot.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -2669,7 +2669,7 @@ cc.game = /** @lends cc.game# */{
26692669
}
26702670
width = width || element.clientWidth;
26712671
height = height || element.clientHeight;
2672-
this.canvas = cc._canvas = localCanvas = document.createElement("CANVAS");
2672+
this.canvas = cc._canvas = localCanvas = cc.$(document.createElement("CANVAS"));
26732673
this.container = cc.container = localContainer = document.createElement("DIV");
26742674
element.appendChild(localContainer);
26752675
}

0 commit comments

Comments
 (0)