diTii.com Digital News Hub

Sign up with your email address to be the first to know about latest news and more.

I agree to have my personal information transfered to MailChimp (more information)


HTML5 in iGoogle Gadgets Implemented

Did you know gadgets can use html5? “The key is in the doctype. Normally doctype of a gadget isn’t mentioned. Specify HTML5 doctype in gadget and it’ll be used when gadget is rendered. See the pic using popular canvas drawing API. The top of the gadget still has usual XML prolog because gadget spec is, as always, an XML document. html, in this case html5, is inside a CDATA block – means the structure of html5 content is pretty much ignored when parsing XML. iGoogle doesn’t do anything extra for compatibility with html5; features specific to html5 will still only work in browsers that support them. Gadgets have same cross-browser compatibility concerns as any other web page. Content of this gadget is pretty straightforward. It includes canvas element. In init method it tries to get a drawing context. If it’s successful (meaning the browsers supports html5 canvas) it’ll draw a rectangle around extents of element then draw 10 randomly placed dots inside. Use this gadget as a starting point to get your own html5 gadget running,” explains Google.


Share This Story, Choose Your Platform!

Get Latest News

Subscribe to Digital News Hub

Get our daily newsletter about the latest news in the industry.
First Name
Last Name
Email address
Secure and Spam free...