Re: [whatwg] Proposal for window.DocumentType.prototype.toString

On Wednesday, October 31, 2012 at 15:02 , Ian Hickson wrote:
> On Tue, 30 Oct 2012, Johan Sundström wrote:
> > That said, I would still much enjoy a future where
> > javascript:alert(document.doctype) would tell you something rich about  
> > the page that we today need deep knowledge of document.compatMode and/or  
> > combinations of XMLSerializer and parsers, or deep study of DocumentType  
> > refdocs to tease out.
>  
> Can you elaborate on that?

Sure – rich as in not "[object DocumentType]", but

…on apple.com: <!DOCTYPE html>

…on roxen.com: <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

…on the Firefox default homepage: <!DOCTYPE html [
  <!ENTITY % htmlDTD
    PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
    "DTD/xhtml1-strict.dtd">
  %htmlDTD;
  <!ENTITY % globalDTD SYSTEM "chrome://global/locale/global.dtd">
  %globalDTD;
  <!ENTITY % aboutHomeDTD SYSTEM "chrome://browser/locale/aboutHome.dtd">
  %aboutHomeDTD;
<!ENTITY % syncBrandDTD SYSTEM "chrome://browser/locale/syncBrand.dtd">
%syncBrandDTD;

<!-- These strings are used in the about:home page -->

<!ENTITY abouthome.pageTitle "&brandFullName; Start Page">

<!ENTITY abouthome.searchEngineButton.label "Search">

<!-- LOCALIZATION NOTE (abouthome.defaultSnippet1.v1):
     text in <a/> will be linked to the Firefox features page on mozilla.com
-->
<!ENTITY abouthome.defaultSnippet1.v1 "Thanks for choosing Firefox! To get the most out of your browser, learn more about the <a>latest features</a>.">
<!-- LOCALIZATION NOTE (abouthome.defaultSnippet2.v1):
     text in <a/> will be linked to the featured add-ons on addons.mozilla.org
-->
<!ENTITY abouthome.defaultSnippet2.v1 "It's easy to customize your Firefox exactly the way you want it. <a>Choose from thousands of add-ons</a>.">

<!ENTITY abouthome.bookmarksButton.label "Bookmarks">
<!ENTITY abouthome.historyButton.label   "History">
<!ENTITY abouthome.settingsButton.label  "Settings">
<!ENTITY abouthome.addonsButton.label    "Add-ons">
<!ENTITY abouthome.appsButton.label      "Marketplace">
<!ENTITY abouthome.downloadsButton.label "Downloads">
<!ENTITY abouthome.syncButton.label      "&syncBrand.shortName.label;">

  <!ENTITY % browserDTD SYSTEM "chrome://browser/locale/browser.dtd" >
  %browserDTD;
]>

--  
 / Johan Sundström, http://ecmanaut.blogspot.com/

Received on Thursday, 1 November 2012 01:58:54 UTC