Adobe-Runtime-Support
Adobe-Runtime-Support copied to clipboard
Location property of StageWebView does not change.
Problem Description
If the URL changes using the History API, the StageWebView's location property will not change.
For example, when you click a link in the web page below, you expect the StageWebVIew's location property to change. http://html5doctor.com/demos/history/
OS: Android 11 AIR SDK: AIR 33.1.1.856
Steps to Reproduce
package {
import flash.display.Sprite;
import flash.events.TimerEvent;
import flash.geom.Rectangle;
import flash.media.StageWebView;
import flash.utils.Timer;
public class Main extends Sprite {
public function Main() {
var webView:StageWebView = new StageWebView()
webView.stage = this.stage
webView.viewPort = new Rectangle(0, 0, stage.fullScreenWidth, stage.fullScreenHeight)
webView.loadURL("http://html5doctor.com/demos/history/") //https://github.com/lesjames/history-api-demo
var timer:Timer = new Timer(1000)
timer.addEventListener(TimerEvent.TIMER, function (e:TimerEvent) {
trace(webView.location); //Clicking on the link doesn't change anything.
})
timer.start()
}
}
}