Skip to content

Commit

Permalink
fabricjs#5530, Support Fabric in XML documents. (fabricjs#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 c25a414 commit 84951d0
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 84951d0

Please sign in to comment.