Are all JavaScript features available in Windows 8 Metro apps? - javascript

When designing Metro apps for Windows 8 with JavaScript, are all features available such as full AJAX support? And what about CSS?
What is supported, and what is not? I haven't been able to find a comprehensive command-reference list yet.

You are asking it wrong ;) Windows 8 WinJS API has much more features than in-browser JavaScript in Windows 8 / IE10.
Update: thanx to Jeremy Poster, for pointing out, there are some security limitation in Windows Store Apps (because it has more privileges, compared to browser). Most visible are: mandatory utf8, absence of window.alert and its friends, url links open in browser by default, .js file caching, and filtration for .innerHTML and company. See all differences.

According to the JavaScript Getting Started page, you can create apps with HTML (so I assume full DOM access), as well as network requests using XMLHttpRequest.
Check out the blog reader demo app.

Since Javascript in Metro runs on IE10 browser, you can check http://caniuse.com/ for information about which browser supports what. In addition, there are additional APIS you can use from "WinRT".

Related

Substituting HTML/Javascript Sidebar Gadgets?

I am a web developer and have a Windows Sidebar Gadget written in HTML/Javascript. It's very popular (500 000+ downloads) and users are requesting solutions for Windows 8 since gadget support has been removed. Microsoft will also remove the sidebar functionality in Windows 7.
What platform/SDK options are there for substituting a sidebar gadget?
I get all kinds of results from Google but none seems like an obvious choice. Adobe Air seems like a whole new piece of technology that requires a lot of learning. Simplicity is key and it's the main reason why i am so attached to sidebar gadgets.
These are the requirements:
Runs on Windows
HTML, Javascript, AJAX based
Support for no window decoration (no titlebar, minimize- or close button)
Minimum platform/SDK wrappers
Ability to read/write xml data to disk
Bonus would be if:
It also runs on Linux and Mac
SDK/Platform dependencies could be included in the app package
Super-duper bonus would be if:
The SDK is supported on handheld devices such as iOS and Android.
Take a look at XUL. Meet all you check list:
Runs on Windows
HTML, Javascript, AJAX based
Support for no window decoration (no titlebar, minimize- or close button)
Minimum platform/SDK wrappers
Ability to read/write xml data to disk
It also runs on Linux and Mac
Here you can find what is it. I hope it helps buddy.
For those who stumbled upon this thread and looking for a way to create HTML/javascript desktop applications. I'm just gonna list AppJS as another potential SDK. The framework to embed with your scripts is 50 MB.
http://appjs.org/
TideSDK seems like another multiplatform option similar to AppJS.
http://www.tidesdk.org/

Windows 8 Metro and Google Analytics

Will it be possible to use the Google Analytics JavaScript library (https://developers.google.com/analytics/devguides/collection/gajs/) for the Windows Metro JavaScript based application to trace views accessed by user?
In general, if a JavaScript library you want to use is on a CDN or a server external to your app, the answer is no, as Windows apps written with HTML/JavaScript cannot load external JavaScript libraries...if you try, a security exception will occur.
Many libraries will work fine if you copy the JS file into your project and run it locally. For example, jQuery works just fine this way. I have not tried the Google Analytics library, so you might just want to test it out and see if it will work with a local copy.
Something else to consider, however, is that unlike a web site, a Windows app written in HTML/JavaScript may occasionally be offline, in which case, a library written with the assumption of network connectivity would likely not work. So in this particular case, you might not get the data that you're hoping for.
Hope that helps.
we tried http://w8ga.codeplex.com/ (w8ga) to work with GA in our win8 js app.
Currently W8GA seems doesn't support html/js. Also I have no idea why developer didn't mension it( it's supports only c#/xaml metro app )
So, we found another way to do it; Look for cobra Tab 's answer at the bottom of this page: http://social.msdn.microsoft.com/Forums/en-US/winappswithhtml5/thread/f81ebbb9-d711-40f1-8a82-9aed44e2d8fe/
And finally, we are waiting Adobe's Omniture sdk:
http://microsite.omniture.com/t2/help/en_US/sc/appmeasurement/winrt/index.html#Developer_Quick_Start
Hope these answers helps...
We're using the free version of markedup in our applications with great success. In addition to simple page views it shows you some app specific numbers like number of installs, exception details, etc.
I'd recommend using the Google Analytics SDK for Windows 8 and Windows Phone. It is built as a WinRT component and therefore supports both JS & Xaml Win8 apps.
Full disclosure: I am the author of this SDK; I built it for my own app and decided to open source it. There are other frameworks out there but AFAIK, none of them support the new GA universal analytics protocol so they only work with older GA properties and don't support all the cool new features GA recently added just for apps.

Developing a cross-platform self-contained HTML application

I am thinking of building an application, kind of like TiddlyWiki in the sense that everything is self-contained in an HTML file, or at least in a bundle where a user won't have to install anything. It works on just about any browser, and on mobile phones (Android and iPhone), and in some browsers (e.g. Firefox), manages to save to the local filesystem without a plugin (albeit, it launches many security warnings, but there are other solutions for that). Other browsers happen to use a Java plugin to bypass this restriction.
Are there any technologies that exist that make this possible? HTML5's web storage sounds like it would be almost perfect, except that the data would be tied to the browser.
Any assistance would be appreciated (even if that just means editting / retagging the question to get more folks looking).
Whats about the fileapi: http://caniuse.com/#search=fileapi
I am just adding a relevant comment with this but not exactly an answer...
When you are saying that you want to develop application which contains everything... Then I would like to add about Titanium, PhoneGap, and others (Corona)...
This softwares provides JavaScript base which will be running on all the mobiles (if mobile applications), desktops (if desktop applications) and so on.... But Titanium (as i am working on it) works on the SDK of all the other languages for development...
Now TiddlyWiki, what i have understood from the link is that it is creating a web application or something like that which will work on all the other mobile devices. But this is NOT Good always, Since some application needs to be a NATIVE environment (which is supported by Titanium). Native applications will be much more faster than any other developed applications..

Create Internet Explorer extension changing content of a webpage

I'd like to develop an Internet Explorer extension that changes the content of a specific webpage, like content scripts in Google Chrome. (eg. when I go to the website Google and I search for "car" I'd like to have a div created on the page with the word "car" inside).
I've been looking on SO but haven't found clear evidences if this kind of thing is possible.
What I'm specifically looking for is a clear tutorial or some example of how to do this.
Bruno,
That is exactly what GreaseMonkey for IE is made for http://www.gm4ie.com/
I have answered a similar question, but the answer is in C#. It describes how to create a fully working project to accomplish exactly what you asked: changing page contents!
How to get started with developing Internet Explorer extensions?
It covers other topics too:
running javascripts from the addin
how to register IE addins
saving data (addin configurations)
You can read more about Internet Explorer Extension from MSDN:
http://msdn.microsoft.com/en-us/library/aa753587(v=vs.85).aspx
Extensions in IE are not created using web technologies, they are created using C++/.NET. Such as ActiveX
Similar to "GreaseMonkey for IE" is Trixie:
Trixie is to Internet Explorer as Greasemonkey is to Firefox. It lets you remix the Web via scripts. You may do this to either make it more readable, fix bugs or to even add little features to make the site more usable to you. Trixie by itself does none of this. It is just a plugin for Internet Explorer that enables executing chunks of JavaScript code and thus lets you use the Web the way you want to use it.
This is one of the best I found. http://www.enhanceie.com/ie/dev.asp It has give sample scripts as well. Which will help you.
Another one is open source and stable version : firebreath
same kind question is also asked How to get started with developing Internet Explorer extensions?
This is a working example of manipulating the DOM from microsoft. This is a BHO development with MS Visual Studio. Check it out: http://msdn.microsoft.com/en-us/library/bb250489%28v=vs.85%29.aspx

Mozilla Firefox programmatic screen capture

I'm interested in writing javascript that will programmatically perform a screen capture of what is viewed in the browser, and save the file to the hard disk. I'd like to be able to type in a list of keywords, and use a search engine's api to programmatically view the page, and take a screen capture.
My first question is, does this sounds like something that would violate the terms of my browser, Firefox, or any or all search engine api's? All of my web development experience is Internet Explorer. I'm aware of the various free and open source applications available, but am not familiar with their licenses.
Is this something that could be done using javascript? I've noticed that there are screen capture add-ons available to install. Is it possible to execute an add-on programmaticaly through javascript?
Is their a Firefox / Mozilla equivalent to an ActiveX control?
Any information would be greatly appreciated.
Thanks
You can use flash/Active X to do it. Check out Kpoint.in, It records the entire desktop from within the browser(Works only for Windows though). I think they are using their own Firefox extension for the Audio.

Categories

Resources