Here's another workaround: you can dispose of the WebView element in the PageControl's unload 'handler':
(function () {
var webView,
page = WinJS.UI.Pages.define("/pages/webView/webView.html", {
ready: function (element, something) {
webView = document.querySelector("#myWebView");
webView.src = "http://www.youtube.com/watch?v=dk5-gCc_4s4";
},
unload: function () {
webView.parentNode.removeChild(webView);
webView = null;
}
});
})();
The YouTube video will continue to play for about a minute. When you navigate back to the page with the WebView, the element will be reloaded with that PageControl. I think that your solution to use navigateToString("")
is the best.