webshim
webshim copied to clipboard
alias $.webshims to $.webshim
I think this would be great for the sake of consistency (e.g., $.webshim.polyfill();)
That way the library name matches the usage, which matches the documentation. I think we can do this by simply aliasing $.webshims and then update all the documentation. This won't break anyone's code, but new implementors will see the consistent style. Thoughts?
I'm not sure about this. Because, I'm not sure about the name. What's better webshims vs. webshim? Something I want to do is to use only webshims.polyfillor webshim.polyfill (without $.) in future docs and all examples. (See the doc refactor).
I want to make webhim's polyfiller.js independent from jQuery. So that people can start downloading polyfills from the document's head and embed jQuery at the end of the body, which is not the best option for perfomance, but better than the default setup of most developers.
I think this will add about 3-4kb compressed and will remove support of IE7. I'm not sure wether I should have 2 different polyfiller.js files for this or the filesize/no IE7 support is negligible. Actually it is, but some people might see it different.
Here I made those changes: https://github.com/aFarkas/webshim/commit/979a6ec2040557d8f067f6ab267dde138962708f.
Btw. I want to move the new doc as soon as possible into the master-branch. I really like it. I would generate some files in subcategories with examples and more documentation.
@aFarkas the changes looks good. I take it tha $.webshimswill be deprecated anyways, and webshim.polyfill is the new recommended way? If no one has started using webshims.polyfill yet, maybe we could name with webshim.polyfill instead? My thoughts are that your github repo is already named webshim.
Btw. I want to move the new doc as soon as possible into the master-branch. I really like it.
Glad to hear it! It took a long time. I think the biggest remaining task is to collect all the usage examples somewhere, and have an examples link from the documentation page. Assuming this sounds good I'll come up with another mockup for that.
Hi Alex, I'd just like to chime in that I agree with mreinstein that consistency would be a Good Thing(TM). I don't have a preference between webshim and webshims.
webshim is already there for a long time. I just have additionally added $.webshim to the List. I'm indeed open to only use webshim in future and will change docs and examples.
Hi Alex, I just tested using webshim.pollyfill() and it fails "webshim is not defined". I looked in polyfiller.js and cannot find webshim defined there. webshims (with an S) is defined. I just want to be clear as to whether a global/window webshim object is supposed to be defined and, if not, what is the official preferred way to invoke webshim.
Try to use: webshim.polyfill()with one "l". Here is the code: https://github.com/aFarkas/webshim/blob/gh-pages/src/polyfiller.js#L80
But your are right about $.webshim I forgot this one.
The current official way is webshims.polyfill but I will change this in the future to webshim.polyfill. So if you prefer webshim.polyfill you can start using it. I will keep all aliases alive for a long time.
I see, I was using the code from the download 1.13.1 button on the demos page. Any idea when you'll be releasing 1.13.2?
soon ;-)