Skip to content

Commit 0e360db

Browse files
committed
Update CHANGES. Related d3#2896 d3/d3-request#12.
1 parent 17e15a9 commit 0e360db

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

CHANGES.md

+8
Original file line numberDiff line numberDiff line change
@@ -673,6 +673,14 @@ The d3.xhr method has been renamed to [d3.request](https://github.com/d3/d3-requ
673673

674674
If an error occurs, the corresponding [ProgressEvent](https://xhr.spec.whatwg.org/#interface-progressevent) of type “error” is now passed to the error listener, rather than the [XMLHttpRequest](https://xhr.spec.whatwg.org/#interface-xmlhttprequest). Likewise, the ProgressEvent is passed to progress event listeners, rather than using [d3.event](https://github.com/d3/d3-selection#event). If [d3.xml](https://github.com/d3/d3-request#xml) encounters an error parsing XML, this error is now reported to error listeners rather than returning a null response.
675675

676+
The [d3.request](https://github.com/d3/d3-request#request), [d3.text](https://github.com/d3/d3-request#text) and [d3.xml](https://github.com/d3/d3-request#xml) methods no longer take an optional mime type as the second argument; use [*request*.mimeType](https://github.com/d3/d3-request#request_mimeType) instead. For example:
677+
678+
```js
679+
d3.xml("file.svg").mimeType("image/svg+xml").get(function(error, svg) {
680+
681+
});
682+
```
683+
676684
With the exception of [d3.html](https://github.com/d3/d3-request#html) and [d3.xml](https://github.com/d3/d3-request#xml), Node is now supported via [node-XMLHttpRequest](https://github.com/driverdan/node-XMLHttpRequest).
677685

678686
## [Scales (d3-scale)](https://github.com/d3/d3-scale/blob/master/README.md)

0 commit comments

Comments
 (0)