- From: Philip Jägenstedt <notifications@github.com>
- Date: Mon, 05 Sep 2016 05:45:14 -0700
- To: whatwg/dom <dom@noreply.github.com>
- Message-ID: <whatwg/dom/issues/221/244738573@github.com>
I did a little bit of research with `SELECT page,url FROM [httparchive:har.2016_08_01_chrome_requests_bodies] WHERE body CONTAINS 'instanceof XMLDocument'` in BigQuery: * [htmldocument.csv](https://gist.github.com/foolip/5109c805a6cd5eb1117607da17b55582) (used `WHERE RAND() < 1/10` to get about 10%, leaving 1254 rows) * [xmldocument.csv](https://gist.github.com/foolip/cd6b62f1b9244a4c29d3e1d49f1e41a1) (76 rows) It's immediately clear that `instaceof HTMLDocument` is way more common. I randomized the order and the first thing I found came from mutation-summary.js by @rafaelw: https://github.com/rafaelw/mutation-summary/blob/421110f84178aa9e4098b38df83f727e5aea3d97/src/mutation-summary.js#L112 @rafaelw, I didn't look too closely, but I take it this code actually matters for getting the correct behavior in both XML and HTML documents? Copies of this code seem to dominate the usage. http://cdn.clicktale.net/www/ChangeMonitor-latest.js showed up a lot but seems to include an older version of mutation-summary. Given the volume of results, I'd be cautious about changing the truthyness of `instanceof HTMLDocument` without further analysis. As for XMLDocument, after checking the most common URL patterns I couldn't find anything that seemed like it would break. So I'd give better odds to making XMLDocument an alias of Document, but that's not a good idea as long as Gecko needs `XMLDocument.protoype.load`. -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/whatwg/dom/issues/221#issuecomment-244738573
Received on Monday, 5 September 2016 12:45:45 UTC