-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add logic to attempt load nomadhelper and call function inside that file
(reference #53)
- Loading branch information
1 parent
ab5397e
commit 8a46a2e
Showing
4 changed files
with
51 additions
and
0 deletions.
There are no files selected for viewing
41 changes: 41 additions & 0 deletions
41
...Human.Portal_Royale/src/net/apacheRoyaleTemplatedApp/controller/CommandLoadNomadHelper.as
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
package controller | ||
{ | ||
import model.proxy.login.ProxyLogin; | ||
|
||
import org.puremvc.as3.multicore.interfaces.INotification; | ||
import org.puremvc.as3.multicore.patterns.command.SimpleCommand; | ||
import org.apache.royale.utils.js.loadJavascript; | ||
import org.apache.royale.net.HTTPService; | ||
import org.apache.royale.net.beads.CORSCredentialsBead; | ||
import org.apache.royale.net.events.FaultEvent; | ||
import org.apache.royale.net.HTTPHeader; | ||
|
||
public class CommandLoadNomadHelper extends SimpleCommand | ||
{ | ||
override public function execute(note:INotification):void | ||
{ | ||
/*window['fetch']("https://nomadweb.venus.startcloud.com/nomad/nomadhelper.js", { mode: 'cors' }).then(function(res:Object):Object { | ||
return {}; | ||
}).catch(function(err:Object):void { | ||
});*/ | ||
|
||
/*loadJavascript("https://nomadweb.venus.startcloud.com/nomad/nomadhelper.js", function():void { | ||
});*/ | ||
window['openLink']("Some"); | ||
/*var service:HTTPService = new HTTPService(); | ||
service.addBead(new CORSCredentialsBead(true)); | ||
service.url = "https://nomadweb.venus.startcloud.com/nomad/nomadhelper.js?openLink&link='Some'"; | ||
service.method = "GET"; | ||
service.addEventListener("complete", function(event:Event):void { | ||
var e:Event = event; | ||
}); | ||
service.addEventListener("ioError", function(event:FaultEvent):void { | ||
var f:FaultEvent = event; | ||
}); | ||
service.send();*/ | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
function openLink(link) { | ||
Console.log("My test link " + link); | ||
} | ||
|
||
/*const urlParams = new URLSearchParams(window.location.search); | ||
const myParam = urlParams.get('link'); | ||
openLink(myParam);*/ |