This week in HTML 5-Episode 2

Source: Internet
Author: User

The window. navigator object, Meta http-equiv = "content-language", the worker object, outerhtml, insertadjacenthtml (), and the continuing saga of the alt attribute.

Welcome back to "this week in HTML 5," where I'll try to summarize the major activity in the ongoing standards process in the whatwg and W3C HTML Working Group.

The biggest news this week is revision 2020, which standardizesNavigatorObject:

TheNavigatorAttribute ofWindowInterface must return an instance ofNavigatorInterface, which represents the identity and state of the user agent (the client), and allows web pages to register themselves as potential protocol and content handlers.

Currently, HTML 5 defines four properties and two methods:

    • Appname
    • Appversion
    • Platform
    • Useragent
    • Registerprotocolhandler
    • Registercontenthandler

This is only a subsetNavigatorProperties and methods that browsers already support. See navigator object on Google doctype for complete browser compatibility information.

Next up:Content-language. No, not the HTTP header, not even<HTML Lang>Attribute, but<Meta>Tag! As reported by Henri sivonen,

It seems that some authoring tools and authors use<Meta http-equiv = 'content-Language' content = 'languagetage'>Instead<HTML lang = 'agetagetag'>.

This led to revision 2057, which defines<Meta> HTTP-equiv = "content-language">Directive and its relationshipLang,XML: Lang, AndContent-languageHTTP header.

In the continuing saga ofALTAttribute, the new syntax for alternate text of auto-generated images (which I covered in last week's episode) has generated some followup discussion. philip Taylor is concerned that it will increase complexity for authoring tools; others feel the complexity is worth the cost. james Graham suggestedNo-text-equivalentAttribute; similar proposals have been discussed before and rejected.

Switching to the new web workers specification (which I also covered last week), Aaron Boodman (one of the developers of Google gears) posted his initial feedback. this kicked off a long discussion and led to the creation ofWorkerObject.

Other interesting changes this week:

  • Revision 2034 and revision 2035 define the outerhtml property, and revision 2040 defines the insertadjacenthtml method. Both properties originally appeared in Microsoft Internet Explorer 5 (outerhtml on msdn, insertadjacenthtml on msdn ).
  • Revision 2044 disallows scripts executing while an alert is displayed.
  • Revision 2046 requires that<SCRIPT src = "javascript:">Not execute script (reported by Simon Pieters)
  • Revision 2063 allows an HTML document to declareXML: LangIf and only if it also declaresLang, To define migration between HTML and XHTML. The language values must be identical. (reported by Simon Pieters .)
  • Revision 2064 defines the behavior when callingDocument. Open ("text/plain "). Re: type parameter of document. open () (detailed review of the DOM) parameters ents the incompatibilities in existing browsers.
  • Revision 2066 defines the orderGetelementsbyname ()(Reported by Maciej stachowiak)
  • Revision 2068 definesWindow. frameelement
  • Revision 2069: don't requireDocument. LocationTo do anything whenDocumentIsn' t inWindow(Reported by Anne Van Kesteren)

Administrivia: "this week in HTML 5" now has its own feed.

Tune in next week for another exciting episode of "this week in HTML 5 ."

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.