Introduction
You can obtain document attributes by Document::getAttributes
method.
Document Attributes List
- W3C-doctype
- Equivalent to what is specified in the <!DOCTYPE> header. This attribute cannot change for the lifetime of a document.
- DocURL
- The location of the current document, including possibly a named anchor jumped to, for example https://www.mozilla.org#maincontent. The document:attributes-changed event is fired if the DocURL changes due to a named anchor jump.
- MimeType
- 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.