Closed cmcnulty closed 10 years ago
Line 114 should also adjust the size of the pop-up when the content is resized:
popup.resizeTo(x, y);
Thanks for all the thoughts and work on this. It's a huge bummer that we can't trap the CSP iframe error—I gather that there's some privacy issues that this would expose, and that may be why the browsers don't fire an event.
Your approach is great, but loading jQuery every time and assuming that a script loading error is a predictor for the CSP error still felt shaky. After some thought, I think I've settled on a slightly different approach:
Thoughts?
Definite improvement over current behavior, and I agree whole-heartedly that my "solution" was making tenuous assumptions, at best. I do think that SGP in a pop-up could be a good solution, but ideally, you'd still want some cross-window communication. Providing a link, which allows users to open it in a new tab or navigate the current window is a good solution, and provides the end user with the most control, which is always a good thing in my mind.
Ok, take a look. I ended up hooking into the postMessage cross-window communication to determine if it had loaded or not. I don't there's any other way to tell. Definitely room for improvement, both functionally and aesthetically, but seems to work.
My solution for #46, does a popup on error of the script load, and always attempts a script injection as a method of trapping script injection blocking. We do this on the assumption that if a site is blocking script injection, they're also blocking frame injection, and we can trap for script injection, but in order to trap for it, we can't skip loading the script in the case that the site is already hosting jQuery.