-
Notifications
You must be signed in to change notification settings - Fork 27.4k
fix(Angular.js): use cookie instead of window.name to load with debug… #13036
base: master
Are you sure you want to change the base?
Conversation
Apparently SauceLabs complains about page reload, which indeed happens.
|
We found a Contributor License Agreement for you (the sender of this pull request) and all commit authors, but as best as we can tell these commits were authored by someone else. If that's the case, please add them to this pull request and have them confirm that they're okay with these commits being contributed to Google. If we're mistaken and you did author these commits, just reply here to confirm. |
… info Use cookie to store a check if the application needs to be loaded with debug info, instead of using window.name. As window.name can be used alread (and be overwritten on page load) Fixes issue angular#13031
… info Use cookie to store a check if the application needs to be loaded with debug info, instead of using window.name. As window.name can be used alread (and be overwritten on page load) Fixes issue angular#13031
1cbdbdd
to
67d9cd5
Compare
CLAs look good, thanks! |
@juliemr do you remember why we used window.name rather than a cookie? |
If I recall correctly, we can't set a cookie on the site without navigating to a different site on its domain first. So, if we would like to be able to mock out modules before they are ever loaded, we need a different strategy. |
Oh, I missed the updates on this PR, my apologies. |
I don't think that localStorage would work either, since it is locked to a domain, right? |
Any other ideas @juliemr ? |
So what's left is a query string parameter, @petebacondarwin? cc @juliemr |
Sorry for the slow response here. I'll think about it more, but when we first designed this it was a toss-up between query string and window.name and we decided that window.name looked cleaner to the user and had less chance of interfering with something custom. Before changing to query params we would have to think carefully about what that could possibly break. |
It might look cleaner, but it can break some functionality (like it did for me). Anyway looking forward to some possible solution. Happy to contribute if I can. |
@klaascuvelier - of course changing the query string could break apps too. It is a bit of a stone or a hard place. Perhaps the idea solution would be for it to be configurable in the projector config. That way, the default would continue to be changing the window name (no BC) but developers could explicitly choose a query parameter to use instead if they wished? |
… info
Use cookie to store a check if the application needs to be loaded with debug info, instead of using window.name. As window.name can be used alread (and be overwritten on page load)
Fixes issue #13031