I'm building a little game using NodeJS and EaselJS that runs great in-browser, locally hosted. I downloaded Visual Studio and started the process of creating a UWP from it so that I can play on my Xbox One. Visual Studio is basically just the middle man, as I am using the "Start Page" and pointing it to my locally hosted web server to create the app, rather than try to re-invent the wheel.
I'd like to take advantage of some of the Windows.UI functions ONLY WHEN it's run as a Window/Xbox app, specifically the Overscan ability for display on a TV. So far I've been unable to get the JS to detect the execution type. I've added
if (Windows)
{
Windows.UI.ViewManagement.ApplicationView.getForCurrentView() ...
}
but when I run it in a regular ol browser I get a Reference error of Windows being undefined. I also tried
if(typeof Windows !== 'undefined'){....
which makes the browser version work fine, but deployment tests in Visual Studio don't see it either (I put a debug console output to make sure).
Is it possible to have a best of both worlds execution, or do I need to go full bore and develop a specific version of the game in VS to get what I want?