Hey all,
Has anyone noticed LocationChangeEvent doesn't appear to fire when using JavaScript? The StageWebView.locationChanging documentation specifies it will be called:
A locationChanging event is only dispatched when the location change is initiated through HTML content or code running inside the StageWebView object,such as when a user clicks a link.
I'm changing the location via JavaScript and only if I've clicked an anchor (<a>) link will this actually fire off correctly. I'm assigning it simply to a button:
<input type="button" value="Click" onclick="location.href = 'http://www.example.com';"/>
The event never fires off.
I'm filling my StageWebView with custom content loaded via loadString() (which doesn't fire off that event). If someone clicks any link I've provided I want to bounce them out to a full browser. I'm trying to preventDefault() so the StageWebView does not load the content while running a navigateToURL() so it opens in Safari (this is an iPad app). Works great for anchors, just not in that quick JavaScript example.
Anyone else notice this behavior?