Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Encourage override of toBBox, compareMinX, compareMinY for CSP issues #14

Merged
merged 1 commit into from
Nov 21, 2013

Conversation

tschaub
Copy link
Contributor

@tschaub tschaub commented Nov 21, 2013

Where the Content Security Policy (or other) disallows the use of eval and related functions (e.g. browser extensions), the toBBox, compareMinX, and compareMinY methods can be overridden.

This makes it so the Function constructor is only used if a custom format is supplied. Default implementations of toBBox, compareMinX, and compareMinY are run otherwise.

This is an alternative to #12 (and doesn't break the current API).

Where the Content Security Policy (or other) disallows the use of eval and related functions (e.g. browser extensions), the toBBox, compareMinX, and compareMinY methods can be overridden.
@mourner
Copy link
Owner

mourner commented Nov 21, 2013

Looks good to me. Thanks!

mourner added a commit that referenced this pull request Nov 21, 2013
Encourage override of toBBox, compareMinX, compareMinY for CSP issues
@mourner mourner merged commit a3891f7 into mourner:master Nov 21, 2013
@mourner
Copy link
Owner

mourner commented Nov 21, 2013

Will publish the new version to NPM once this pull is sorted: #11

@mourner mourner mentioned this pull request Nov 21, 2013
@tschaub tschaub deleted the less-evil-II branch November 21, 2013 15:58
@mourner mourner mentioned this pull request Dec 4, 2013
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.

2 participants