Allow a preconfigured URLRequest to be passed in.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5646 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
@@ -30,11 +30,15 @@ public class NetUtil
|
|||||||
* Convenience method to load a web page in the browser window without
|
* Convenience method to load a web page in the browser window without
|
||||||
* having to worry about SecurityErrors in various conditions.
|
* having to worry about SecurityErrors in various conditions.
|
||||||
*
|
*
|
||||||
|
* @param url a String or a URLRequest.
|
||||||
|
* @param preferredWindow the browser tab/window identifier in which to load. If you
|
||||||
|
* specify a non-null window and it causes a security error, the request is retried with null.
|
||||||
|
*
|
||||||
* @return true if the url was able to be loaded.
|
* @return true if the url was able to be loaded.
|
||||||
*/
|
*/
|
||||||
public static function navigateToURL (url :String, preferredWindow :String = "_self") :Boolean
|
public static function navigateToURL (url :*, preferredWindow :String = "_self") :Boolean
|
||||||
{
|
{
|
||||||
var ureq :URLRequest = new URLRequest(url);
|
var ureq :URLRequest = (url is URLRequest) ? URLRequest(url) : new URLRequest(String(url));
|
||||||
while (true) {
|
while (true) {
|
||||||
try {
|
try {
|
||||||
flash.net.navigateToURL(ureq, preferredWindow);
|
flash.net.navigateToURL(ureq, preferredWindow);
|
||||||
|
|||||||
Reference in New Issue
Block a user