rodneyrehm / viewport-units-buggyfill

Making viewport units (vh|vw|vmin|vmax) work properly in Mobile Safari.
MIT License
1.59k stars 151 forks source link

Wrap in the module? #80

Closed dartess closed 7 years ago

dartess commented 7 years ago

I do not use the package manager to store the connected resources, but I use gulp to build the project. Apparently, because of the above "strict mode", the string } (this, function () { was replaced with } (undefined, function () { and everything broke. I wrapped all the contents in an anonymous module (function(){ ... })(), this solved the problem. Be it worth adding your file so that its behavior can not be broken outside?

rodneyrehm commented 7 years ago

I've never heard of this problem before, but sure, adding an IIFE is benign enough. do you want to submit a PR for that?

dartess commented 7 years ago

If I format the code, it will change 100% of the file. This is normal? If yes, I will do pr.

rodneyrehm commented 7 years ago

you'll add two lines and everything else is a change in whitespace… that's totally fine.

in github you can view whitespace ignoring diffs by appending ?w=1 to the url. compare regular diff to same diff without whitespace - the latter omits 9 changes that only add/remove spaces.

dartess commented 7 years ago

https://github.com/rodneyrehm/viewport-units-buggyfill/pull/81

rodneyrehm commented 7 years ago

thank you!

we'll wait for a few other things to land before releasing the next version :)