Closed Flimm closed 7 years ago
Thanks for your pull request. It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).
:memo: Please visit https://cla.developers.google.com/ to sign.
Once you've signed, please reply here (e.g. I signed it!
) and we'll verify. Thanks.
Thanks for your pull request. It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).
:memo: Please visit https://cla.developers.google.com/ to sign.
Once you've signed, please reply here (e.g. I signed it!
) and we'll verify. Thanks.
I signed it.
CLAs look good, thanks!
CLAs look good, thanks!
This means that the script won't block rendering earlier than needed. A preferable solution would be to use the
async
HTML attribute, but that would require a way to put the custom code in a callback, and this library isn't ready for that yet.If you don't want to change the example code, than at least document that the script tag's location is not required to be in the
section. As it stands, developers that are using the polyfill do not know the best place to put it by default as you said, because it doesn't just depend on the site infrastructure, it also depends on the behaviour of the script. For example, if a script is calling document.write, it will behave differently depending on whether it's in the section or not. Even if I fully review the script's code and determine that it behaves correctly when included in the section now, I don't have the reassurances of the documentation that an upgrade won't break it.