You can obtain document attributes by
Document Attributes List
- Equivalent to what is specified in the <!DOCTYPE> header. This attribute cannot change for the lifetime of a document.
- The location of the current document, including possibly a named anchor jumped to, for example http://www.mozilla.org#maincontent. The document:attributes-changed event is fired if the DocURL changes due to a named anchor jump.
- The mime or media type, such as text/plain, text/html, image/jpeg, image/svg+xml, application/xml+xhtml and application/vnd.mozilla.xul+xml. This attribute cannot change for the lifetime of a document.