diff --git a/src/pattern.class.js b/src/pattern.class.js index 01766488087..737061e6b42 100644 --- a/src/pattern.class.js +++ b/src/pattern.class.js @@ -85,6 +85,10 @@ fabric.Pattern = fabric.util.createClass(/** @lends fabric.Pattern.prototype */ else if (typeof this.source.src === 'string') { source = this.source.src; } + // element + else if (typeof this.source === 'object' && this.source.toDataURL) { + source = this.source.toDataURL(); + } return { source: source,