-
-
Notifications
You must be signed in to change notification settings - Fork 3.8k
Implement support for missing XMLHttpRequest APIs
Josh Matthews edited this page Sep 17, 2015
·
1 revision
Background information: Servo implements many API specifications that are relied upon by the JavaScript that executes on pages all over the internet. One of these is XMLHttpRequest, which is used to make HTTP requests dynamically. Some of the less common features of this API are currently unimplemented in Servo, so addressing this shortfall will improve our compatibility with the web of today.
Initial steps:
- compile Servo and ensure that it runs on
tests/html/about-mozilla.html - email the mozilla.dev.servo mailing list introducing your group and your progress
- uncomment the
overrideMimeTypeAPI inXMLHttpRequest.webidl, and add a stub method that allows Servo to compile again toxmlhttprequest.rs. - run the tests via
./mach test-wpt tests/wpt/web-platform-tests/XMLHttpRequest/and adjust the expectations for any that now pass (tests/wpt/metadata/XMLHttpRequest/) - add new
override_charsetandoverride_mime_typefields to theXMLHttpRequeststructure - implement the
overrideMimeTypesteps described in the specification - update any tests that now pass
Subsequent steps:
- implement the specified behaviour for the
override MIME type/final MIME typeandoverride charset/final charset(see uses offinal MIME typein various places in the spec) - uncomment and implement the responseXML API and
documentresponse type (and associatedresponseTypebehaviour) - support the
withCredentialsAPI- implement the XMLHttpRequest API and associated changes to other APIs (search for
withCredentials) - implement basic network-level support by adding a member to
LoadDatathat is used byhttp_loader.rsto conditionally exclude cookies from the HTTP request if the flag is false (default true)
- implement the XMLHttpRequest API and associated changes to other APIs (search for