XHTML is represented as an XMLDocument
Reported by
aa...@spetner.com,
Jul 30 2017
|
||||||
Issue descriptionUserAgent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/59.0.3071.115 Safari/537.36 Steps to reproduce the problem: 1. In a file served as application/xhtml+xml, set a property of HTMLDocument.prototype 2. Try to access that property via the document (window.document) object What is the expected behavior? The property should be accessible via the document object What went wrong? The property is either "undefined" (in the case of a new property) or still retains the old value (in the case of an existing property). Did this work before? N/A Chrome version: 59.0.3071.115 Channel: n/a OS Version: 10.0 Flash Version: I have attached two files, one html and one xhtml. They contain the same code. When opening the HTML file, the console shows "OneTwoThree", whereas when opening the XHTML file, it shows "undefined". It seems this only occurs with HTMLDocument. Other objects, such as HTMLElement seem unaffected.
,
Jul 31 2017
It seems a trivial XHTML document, like this: data:application/xhtml+xml,<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml"></html> gets an instance of XMLDocument, rather than an instance of HTMLDocument (which by spec is a deprecated alias for Document, but Blink presently implements as a separate interface). If you modify Document.prototype, this works fine. I don't know what the desired behaviour is here, so bouncing to DOM team for triage.
,
Aug 4 2017
AFAIK, UA should create a Document even for XHTML resources, neither HTMLDocument nor XMLDocument. Though web authors should use Document instead of HTMLDocument, producing an XMLDocument for an XHTML resource is a bug, I think. Safari uses XMLDocument, Firefox uses HTMLDocument, Edge uses Document.
,
Aug 4 2017
,
Aug 6
This issue has been Available for over a year. If it's no longer important or seems unlikely to be fixed, please consider closing it out. If it is important, please re-triage the issue. Sorry for the inconvenience if the bug really should have been left as Available. For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
,
Aug 10
|
||||||
►
Sign in to add a comment |
||||||
Comment 1 by dtapu...@chromium.org
, Jul 31 2017