Fix #50, by not using doc.body until Sketch.create() is called.
Note that you still need dom ready for Sketch.create() to work, I updated the drawing example to demonstrate this requirement.
Both test cases and demos have been ran successfully to confirm this change is working.
PS: given both window and document are in global context, I find passing both this and this.document a bit unnecessary, so clean that up a bit as well.
Fix #50, by not using
doc.body
untilSketch.create()
is called.Note that you still need dom ready for
Sketch.create()
to work, I updated the drawing example to demonstrate this requirement.Both test cases and demos have been ran successfully to confirm this change is working.
PS: given both
window
anddocument
are in global context, I find passing boththis
andthis.document
a bit unnecessary, so clean that up a bit as well.