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

file-picker.js pollutes the global namespace #22

Open
VP- opened this issue Nov 10, 2020 · 0 comments
Open

file-picker.js pollutes the global namespace #22

VP- opened this issue Nov 10, 2020 · 0 comments

Comments

@VP-
Copy link

VP- commented Nov 10, 2020

The file dist/file-picker.js creates global vairables, which can conflict with existing global variables. An example of how the included lodash overwrites window._:

<!doctype html>
<meta charset=UTF-8>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/underscore-min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/vue@2/dist/vue.js"></script>
<script>_.mixin({ square: x => x*x })</script>
<script src="file-picker.js"></script>
<script>console.log(_.square(3))</script>
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

No branches or pull requests

1 participant