File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed
Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change 11import { AppConfig } from '../models/AppConfig' ;
22import { EnvironmentKind } from '../models/EnvironmentKind' ;
33import ProxyFrameHost from '../modules/frames/ProxyFrameHost' ;
4- import { contains } from '../utils' ;
54import SdkEnvironment from './SdkEnvironment' ;
65
76export default class AltOriginManager {
@@ -10,7 +9,13 @@ export default class AltOriginManager {
109
1110 }
1211
13- static async discoverAltOrigin ( appConfig ) : Promise < ProxyFrameHost > {
12+ /*
13+ * This loads all possible iframes that a site could be subscribed to
14+ * (os.tc & onesignal.com) then checks to see we are subscribed to any.
15+ * If we find what we are subscribed to both unsubscribe from onesignal.com.
16+ * This method prefers os.tc over onesignal.com where possible.
17+ */
18+ static async discoverAltOrigin ( appConfig : AppConfig ) : Promise < ProxyFrameHost > {
1419 const iframeUrls = AltOriginManager . getOneSignalProxyIframeUrls ( appConfig ) ;
1520
1621 const allProxyFrameHosts : ProxyFrameHost [ ] = [ ] ;
You can’t perform that action at this time.
0 commit comments