Open Bug 983090 Opened 6 years ago Updated 3 months ago

Try to remove document.load

Categories

(Core :: DOM: Core & HTML, task, P5)

task

Tracking

()

People

(Reporter: Ms2ger, Unassigned)

References

Details

(Keywords: dev-doc-needed, site-compat)

Afaict, Weblinkit and IE don't support it. Time to kill?
I thought it was in IE at some point, in data documents.

At least it is in the spec http://www.whatwg.org/specs/web-apps/current-work/multipage/dom.html#loading-xml-documents
But yes, if we can remove it, great.
What exact tests did you run to determine IE non-support?  Did you try this:

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

?

Note the sadfaces at <https://www.w3.org/Bugs/Public/show_bug.cgi?id=14037#c10> though, and <https://www.w3.org/Bugs/Public/show_bug.cgi?id=14037#c14>.  But maybe nowadays that library is not used much?  We'd have to add some sort of use counter here, no matter what.  :(
(In reply to Boris Zbarsky [:bz] from comment #3)
> What exact tests did you run to determine IE non-support?  Did you try this:
> 
>   xmlDoc = new ActiveXObject("Microsoft.XMLDOM")
>   xmlDoc.load(whatever);
> 
> ?

That does still work in IE. *sigh*.
I think this is another one where I'd like to see some telemetry data before doing anything. Document loading was something that in the past had to be done through browser-specific APIs before we had cross-browser XHR. I would not be surprised if browser-specific codepaths have been cargo-culted forward.
Whiteboard: [good first bug]
Keywords: dev-doc-needed
This is probably not a good first bug if we need to add usage telemetry and update MDN documentation. :)
Whiteboard: [good first bug]
Is adding telemetry that hard? It should not be that hard :-(
No. Adding telemetry probes is easy, and MDN is just a wiki.
Whiteboard: [good first bug]
Adding telemetry probes is easy.  Adding a telemetry probe that measures usage of something on the web is, afaict, hard.  I've never figured out how to do it.
Well, I meant adding telemetry probes technically is easy.
Deciding what to measure is harder.
I would probably mark the scope object (nsGlobalWindow) to have had document.load usage
if one uses document.load in any of the Document objects bound to that window.
Then in nsGlobalWindow dtor or somewhere have the probe to count the number of
non-chrome content windows which have had document.load usage vs. the windows which haven't had.
OK, I'd like some confirmation that this is still believed to be a good first bug. If we're uncertain I'll remove that flag, but if you're convinced the answer is yes then put your money where your mouth is and sign on to mentor.
Whiteboard: [good first bug]
Keywords: site-compat
Priority: -- → P5
Component: DOM → DOM: Core & HTML
Type: defect → task
You need to log in before you can comment on or make changes to this bug.