Skip to content

Conversation

@asturur
Copy link
Member

@asturur asturur commented Apr 25, 2020

close #1621

BREAKING: patterns that uses functions are no more supported

Pattern will transition to fabric v4, but will be sort of deprectated.
A new Pattern will be created, that will allow to define patterns with fabric objects.

@asturur asturur merged commit c25116d into master Apr 26, 2020
@asturur asturur deleted the ISSUE-1621-remove-unsafe-eval branch August 9, 2020 04:57
@sz5000
Copy link

sz5000 commented Sep 22, 2021

This changes breaks fabric.PatternBrush.

brush = new fabric.PatternBrush(canvas);

... use the brush

results in an browser error

this is because this code is removed:

// function string
if (typeof fabric.util.getFunctionBody(options.source) !== 'undefined') {
this.source = new Function(fabric.util.getFunctionBody(options.source));
callback && callback(this);
}

this code is required if you use the getPatternSrc function of fabric.PatternBrush

@sz5000 sz5000 mentioned this pull request Sep 22, 2021
ShaMan123 added a commit that referenced this pull request Sep 5, 2022
This line was missed in #6296
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Fabric js is not csp unsafe-eval compliant

3 participants