Skip to content

Instantly share code, notes, and snippets.

@geetfun
Created September 10, 2015 21:30
Show Gist options
  • Save geetfun/2fec7d302331b3b87a75 to your computer and use it in GitHub Desktop.
Save geetfun/2fec7d302331b3b87a75 to your computer and use it in GitHub Desktop.
App.onLaunch = function(options) {
var templateURL = 'http://localhost:9001/templates/alert.tvml';
function getDoc(url) {
var request = new XMLHttpRequest();
request.responseType = "application/xml";
request.addEventListener("load", function() {
navigationDocument.pushDocument(request.responseXML)
}, false);
request.open("GET", url, true);
request.send();
return request;
}
getDoc(templateURL);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment