Skip to content

Commit

Permalink
#5530, Support Fabric in XML documents. (#5531)
Browse files Browse the repository at this point in the history
  • Loading branch information
ajvincent authored and asturur committed Mar 2, 2019
1 parent 053e419 commit 37b4275
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion HEADER.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,10 @@ else if (typeof define === 'function' && define.amd) {
}
/* _AMD_END_ */
if (typeof document !== 'undefined' && typeof window !== 'undefined') {
fabric.document = document;
if (document instanceof HTMLDocument)
fabric.document = document;
else
fabric.document = document.implementation.createHTMLDocument("");
fabric.window = window;
}
else {
Expand Down

0 comments on commit 37b4275

Please sign in to comment.