Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove XMLDocument.prototype.load #1478

Merged
merged 2 commits into from
Jul 6, 2016
Merged

Remove XMLDocument.prototype.load #1478

merged 2 commits into from
Jul 6, 2016

Conversation

domenic
Copy link
Member

@domenic domenic commented Jun 30, 2016

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
@smaug----
Copy link

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

@domenic
Copy link
Member Author

domenic commented Jun 30, 2016

Edge does not.

@domenic
Copy link
Member Author

domenic commented Jun 30, 2016

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

@annevk
Copy link
Member

annevk commented Jul 1, 2016

Do we still need XMLDocument if we do this?

@zcorpan
Copy link
Member

zcorpan commented Jul 1, 2016

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
Copy link
Member

Ms2ger commented Jul 7, 2016

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
Copy link
Member

annevk commented Jul 7, 2016

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

@cdumez
Copy link

cdumez commented Jul 7, 2016

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

@bzbarsky
Copy link
Contributor

bzbarsky commented Jul 7, 2016

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
Copy link
Contributor

bzbarsky commented Jul 7, 2016

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
Copy link
Member Author

domenic commented Jul 7, 2016

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

@smaug----
Copy link

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
Copy link
Member Author

domenic commented Jul 7, 2016

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
Copy link
Contributor

bzbarsky commented Jul 8, 2016

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
Copy link
Member Author

domenic commented Jul 8, 2016

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

@bzbarsky
Copy link
Contributor

bzbarsky commented Jul 8, 2016

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
Copy link
Member Author

domenic commented Jul 8, 2016

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

@cdumez
Copy link

cdumez commented Jul 29, 2016

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

@annevk
Copy link
Member

annevk commented Jul 29, 2016

@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