Link to home
Start Free TrialLog in
Avatar of jagguy
jagguyFlag for Australia

asked on

vs2010 and html5

I have downloaded sp1 with vs2010 and I want to run html5 apps.
Now on top left I change the  target schema to html5 in drop down box.

The code works fine if I run it in FF but when I click F5 to run it in VS2010 virtual browser then I get an error with JScript


I cant run html5 in virtual broswer in vs2010
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<body>

<canvas id="myCanvas" width="300" height="300" style="border:1px solid #c3c3c3;">
Your browser does not support the canvas element.
</canvas>

<script type="text/javascript">

    var c = document.getElementById("myCanvas");
    var ctx = c.getContext("2d");
    ctx.fillStyle = "#FF0000";
    ctx.fillRect(0, 0, 200, 200);

</script>

</body>
</html>

Open in new window

Avatar of COBOLdinosaur
COBOLdinosaur
Flag of Canada image

Ironic that you should be using a microsoft tool to do HTML5.  Of all browser manufacturers IE has the lowest compliance with HTML5 standards(less than50%) all other modern browsers are around 90%.

Given that You might want to start by changing the doctype to <!DOCTYPE HTML5>

You may find that using a tool from a low compliance source to be limiting, or it may produce code that doesnot work cross-browser.


Cd&
Avatar of jagguy

ASKER

ok bad idea.

well i used notepad and what else?
I didn't say it was a bad Idea, I was just urging caution.  HTML5 is still only a proposed standard and there are still issues to be worked out.  There is not a lot of tools ready for prime time yet.

However This site

Has some impressive effects for canvas and the code is opened for use.



Cd&
If you really want to see possibilities Check out this



Cd&
Avatar of jagguy

ASKER

ok so i am using notepad because i cant get this working in aloha or aptana
I looked at the sites of both Aloha an Aptana and neither one indicates support for HTML5.  In fact both of them are still using XHTML doctypes on the site.  That is the current standard and best practice.  Companies that supply development tools, environments and platforms are not going to race to market while there are still issues with what the actual HTML5 standard will look like.  There is some inconsistent proprietary support in browsers, and a few of us in the Q and A community are trying to understand how things will work, but a developer trying to jump out ahead of the standard is going to be pretty much on his own for at least another year.  

Given what we have seen historically, the first tools that claim to be "HTML5 compliant" will be crap, and incomplete; much the same as it was when we transitioned to XHTML.

I wish I could be a lot more help, but we here at EE and other help sites are learning this stuff as we go.

Cd&
Avatar of jagguy

ASKER

yes both have html 5 support as I found them on 'html5 editors list'

given people have created games with html5 there must be a IDE somewhere
ASKER CERTIFIED SOLUTION
Avatar of COBOLdinosaur
COBOLdinosaur
Flag of Canada image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial