The document.domain = document.domain trick appears to only be relevant when
using long-polling on a different subdomain or port, which is never the case
under Sandstorm. See comment from the author at
http://stackoverflow.com/a/1525312
However, this behavior is problematic when CSP sandboxing - the frame is not
supposed to be able to modify its origin.
Since Sandstorm does not require this behavior, we remove the lines that cause
the app to break when run under a CSP sandbox.
The document.domain = document.domain trick appears to only be relevant when using long-polling on a different subdomain or port, which is never the case under Sandstorm. See comment from the author at http://stackoverflow.com/a/1525312
However, this behavior is problematic when CSP sandboxing - the frame is not supposed to be able to modify its origin.
Since Sandstorm does not require this behavior, we remove the lines that cause the app to break when run under a CSP sandbox.