Bug 148692

Summary: Range API should throw a TypeError for null Node parameters
Product: WebKit Reporter: Chris Dumez <cdumez>
Component: DOMAssignee: Chris Dumez <cdumez>
Status: RESOLVED FIXED    
Severity: Normal CC: commit-queue, rniwa, webkit-bug-importer
Priority: P2 Keywords: InRadar, WebExposed
Version: Other   
Hardware: Unspecified   
OS: Unspecified   
URL: https://dom.spec.whatwg.org/#range
Attachments:
Description Flags
Patch none

Chris Dumez
Reported 2015-09-01 16:15:33 PDT
Range API should throw a TypeError for null Node parameters. We currently throw a NotFoundError. As per the DOM specification, the Node arguments are not optional nor nullable [1]: https://dom.spec.whatwg.org/#range Therefore, as per the Web IDL specification, we should throw a TypeError if the Node parameter is null or missing: https://heycam.github.io/webidl/#es-interface (step 1). [1] https://heycam.github.io/webidl/#es-nullable-type
Attachments
Patch (39.38 KB, patch)
2015-09-01 16:30 PDT, Chris Dumez
no flags
Chris Dumez
Comment 1 2015-09-01 16:30:45 PDT
WebKit Commit Bot
Comment 2 2015-09-01 18:38:23 PDT
Comment on attachment 260390 [details] Patch Clearing flags on attachment: 260390 Committed r189240: <http://trac.webkit.org/changeset/189240>
WebKit Commit Bot
Comment 3 2015-09-01 18:38:28 PDT
All reviewed patches have been landed. Closing bug.
Chris Dumez
Comment 4 2015-09-02 13:13:27 PDT
Note You need to log in before you can comment on or make changes to this bug.