Skip to content

Remove XMLDocument.prototype.load - #1478

Merged
annevk merged 2 commits into
masterfrom
rm-xmldocument-load
Jul 6, 2016
Merged

annevk merged 2 commits into
masterfrom
rm-xmldocument-load

Conversation

@domenic

@domenic domenic commented Jun 30, 2016

Copy link
Copy Markdown
Member

This is only implemented in Gecko, and is long-deprecated.

@smaug----, any objections? I notice it was deprecated in Gecko in https://bugzilla.mozilla.org/show_bug.cgi?id=494705. I'm happy to file a removal bug.

@domenic domenic added the removal/deprecation Removing or deprecating a feature label Jun 30, 2016
@domenic domenic mentioned this pull request Jun 30, 2016
26 of 31 tasks
@smaug----

Copy link
Copy Markdown

oh, yes, we should get rid of the horrible .load.
Does IE support it still? It was originally IEism, I think.

@domenic

domenic commented Jun 30, 2016

Copy link
Copy Markdown
Member Author

Edge does not.

@domenic

domenic commented Jun 30, 2016

Copy link
Copy Markdown
Member Author

I think this might also allow us to make XMLDocument an alias of Document, like HTMLDocument is supposedly specced as...

@annevk

annevk commented Jul 1, 2016

Copy link
Copy Markdown
Member

Do we still need XMLDocument if we do this?

@zcorpan

zcorpan commented Jul 1, 2016

Copy link
Copy Markdown
Member
SELECT page, url
FROM [httparchive:har.2016_06_15_chrome_requests_bodies]
WHERE body CONTAINS "XMLDocument.prototype"

565 matches. So at least it should be an alias, but possibly it needs to stay as separate (if a script adds something to XMLDocument.prototype but expects it to not be present for other documents).

results-20160701-101246.csv.zip

This is only implemented in Gecko, and is long-deprecated.
@domenic
domenic force-pushed the rm-xmldocument-load branch from 8f8dec0 to c9dc776 Compare July 6, 2016 16:46
@annevk
annevk merged commit 523f7a8 into master Jul 6, 2016
@annevk
annevk deleted the rm-xmldocument-load branch July 6, 2016 17:06
annevk added a commit to whatwg/dom that referenced this pull request Jul 6, 2016
@Ms2ger

Ms2ger commented Jul 7, 2016

Copy link
Copy Markdown
Member

In https://bugzilla.mozilla.org/show_bug.cgi?id=983090, bz mentioned

  xmlDoc = new ActiveXObject("Microsoft.XMLDOM")
  xmlDoc.load(whatever);

Did you test that in IE?

@annevk

annevk commented Jul 7, 2016

Copy link
Copy Markdown
Member

Results in an error in Edge, "'ActiveXObject' is undefined".

@cdumez

cdumez commented Jul 7, 2016

Copy link
Copy Markdown

FYI, as far as I know, WebKit does not support this and we do not have plans to support it either.

@bzbarsky

bzbarsky commented Jul 7, 2016

Copy link
Copy Markdown
Contributor

Note that there is code out there that does browser sniffing and would break in browsers it does not sniff as "WebKit" that don't have document.load. Edge gets away with things because it gets sniffed as "WebKit". See https://www.w3.org/Bugs/Public/show_bug.cgi?id=14037#c10 and relatedly https://www.w3.org/Bugs/Public/show_bug.cgi?id=14037#c14 and I'm so tired of having to repeat this stuff every so often....

@bzbarsky

bzbarsky commented Jul 7, 2016

Copy link
Copy Markdown
Contributor

And note that the current spec was written precisely in a way that would allow all UAs to implement it and be compatible with known existing content... That's what https://www.w3.org/Bugs/Public/show_bug.cgi?id=14037 was all about.

@domenic

domenic commented Jul 7, 2016

Copy link
Copy Markdown
Member Author

I guess we could add this to Gecko compatibility mode...

@smaug----

Copy link
Copy Markdown

and I'm so tired of having to repeat this stuff every so often....

Could we add some comments to the spec source code to prevent this kind of issues.
There isn't any good blame for spec source code so it should really be in the source code somewhere.

@domenic

domenic commented Jul 7, 2016 •

Copy link
Copy Markdown
Member Author

Yes, I think that adding comments is definitely the correct way to handle this sort of thing.

So Mozilla would prefer we add this back in Gecko compatibility mode? I assume that'd be easier than trying to do telemetry to see if things have changed since 2011.

@bzbarsky

bzbarsky commented Jul 8, 2016

Copy link
Copy Markdown
Contributor

I'm not sure I have a strong preference for whether this should be added in the compat mode or just as a spec note or something, but I do want the spec to document reality so new engine implementors are not lead astray...

@domenic

domenic commented Jul 8, 2016

Copy link
Copy Markdown
Member Author

Well, new engine implementers should not implement XMLDocument.prototype.load, so I'm not sure what the issue is there...

@bzbarsky

bzbarsky commented Jul 8, 2016

Copy link
Copy Markdown
Contributor

Then new engine implementers need to have a UA string that will sniff as "WebKit" by the relevant libraries and need to implement a bunch of webkit-prefixed stuff. Does the spec document that?

@domenic

domenic commented Jul 8, 2016

Copy link
Copy Markdown
Member Author

That's fair. It sounds like Gecko compatibility mode would be the best place to document this, then.

@cdumez

cdumez commented Jul 29, 2016

Copy link
Copy Markdown

If we drop XMLDocument.prototype.load, do we still need XMLDocument? XMLDocument brings nothing beside load().

@annevk

annevk commented Jul 29, 2016

Copy link
Copy Markdown
Member

@cdumez could you comment on whatwg/dom#278 instead? And maybe indicate what the status is in WebKit? It sounds like Gecko needs to keep the distinction around... And developers might have used XMLDocument.prototype...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

removal/deprecation Removing or deprecating a feature

Development

Successfully merging this pull request may close these issues.

7 participants