How to intercept didStartLoad in web view (metro apps) - windows-8

I have been developing iOS and Mac OSX apps since years. So, I was pretty surprised to find no method for Windows 8 Metro WebView to intercept when it starts loading a new page, but only when it finishes loading.
Is there really any workaround for this? I could not find anything both in the docs and on the web...
Thank you very much!
Fabio

You can use the Window.External.Notify() method to trigger an event back in your C# or whatnot. You can also use the Webview.InvokeScript() to activate scripts from outside the control. You can write a script as a string outside the WebView and use the WebView.InvokeScript() with "eval" as the first arg to run that script inside the control.
ScriptNotify
This shows how to use both ScriptNotify and InvokeScript

Related

How to start "Here Drive+" navigation via app call with parameter (NFC tag)

I have Windows Phone 8.1 and just started to play around with nfc tags. I created a tag which calls the app "Here Drive+" which works fine, but i want to pass an address or coordinates to immediatly start the navigation to that location. Are there any supoorted parameters to do that?
You used to be able to find the HERE Launcher APIs available here, but the documentation isn't available there anymore.

How to debug the changes made in application on titanium without relaunching the application?

After launching the application, i make some code changes. Is relaunching the application necessary each and every time i make a change to the code.
MRT is right As there is Fastdev server(For classic approach) in Titanium which automatically push the changes to your app if there are changes except in app.js ,Also If you are using the Alloy Approach than for speedy development you can use Ti Shadow.
you can find it Here.
Use TIShadow!
It supports rapid deployment and testing of traditional titanium projects and alloy projects
Yes, you need to Relaunch again when you any change make in your code.
But, Some time this is working without Relaunch. But not in Home page. This is working when you are using on Sub view and use URL Property in CreateWindow Object.
But, best way to Relaunch you App always.
May this Information is helpful for you.
Thanks,

Opening an extjs window as a native "chrome window" in tideSDK - possible?

I'm in the early stages of planning a webapp that also needs to be deployed as a desktop application using tideSDK. The latter I'm not yet familiar with. Hence, my question:
Q: In tideSDK, can an extjs (javascript created) window be opened in a native window (that could be moved to a second screen, for example)?
If so, how is that done? Any pointers or links would be helpful and greatly appreciated.
Or would several windows in tideSDK (triggered within the same application) act like independant browser instances? In this case, I assume, the whole extjs framework would have to be loaded again?
Thanks everyone in advance!
Thomas

Window.Current in a WinJS application

I have a Window Runtime Component that accesses the Window.Current object, to add an handler on the VisibilityChanged event.
If I run that code in a C# Windows Store App, it runs perfectly (as soon as I do that in a method where the Window has been initialized).
Unfortunately, I am unable to do that in a WinJS app. It breaks when I launch the app.
Why ?
Thanks !
Window.Current is a XAML concept. It simply doesn't exist in an HTML/JS app. You can't host or use XAML objects in a WinJS app.
You need to attach to the corresponding browser events instead, in Javascript.

WinRt WebView control handling navigation within the control

I have a Metro app using a WebView control. I'm using NavigateToString to load a html file which may contain hyperlinks. What I then want to do is detect when one of these hyperlinks is selected and, instead of allowing navigation within the WebView control, to launch IE and view the page there instead.
Is this possible within the WinRT constraints, and if so, how?
So far, I've tried capturing the WebView_LoadCompleted() event, but although it does fire at the right time, I can't see any details about the URI from the NavigationEventArgs.
Unfortunately this isn't possible directly because WebView does not include events like Navigating (which were present in Windows Phone).
Luckily Nick Randolph (brilliant Windows Phone and Windows 8 developer) has created a workaround using script events. He's got a great write up on his blog:
http://nicksnettravels.builttoroam.com/post/2012/04/21/Limitations-of-the-WebView-in-Windows-8-Metro-Apps.aspx