- From: Toothbrush <notifications@github.com>
- Date: Wed, 21 Oct 2015 06:13:03 -0700
- To: whatwg/dom <dom@noreply.github.com>
Received on Wednesday, 21 October 2015 13:13:32 UTC
https://dom.spec.whatwg.org/#interface-characterdata `appendData`, `insertData`, `deleteData`, and `replaceData` do not specify what to do when passed `null`. I did notice that the `data` parameter is specified as `DOMString`, not `DOMString?`. Currently, Mozilla Firefox and Google Chrome treat `null` as if it were `"null"` (I guess by converting `null` to `String` internally when called); and I am not sure whether to follow that behaviour in a DOM library I am writing (i.e. converting `data` to `String` where possible, and throwing otherwise). Example ------- ```js let text = new Text(); text.appendData(null); console.log(text.data); // => "null" ``` --- Reply to this email directly or view it on GitHub: https://github.com/whatwg/dom/issues/97
Received on Wednesday, 21 October 2015 13:13:32 UTC