Closed marcoscaceres closed 11 years ago
Implemented but untested. Waiting in pull request queue.
@FremyCompany, I wonder if we want to support the "convert a DOMString to a sequence of Unicode characters" algorithm as part of the conversion? Not sure if i should add it or not.
I don't think. We should just leave to //NOTE in the code to make sure we document our choice to leave this away for now.
WFM. Thanks. Will start testing DOMString these now.
I'm confused as to calling WebIDL.DOMString()
results in an ES6 "abrupt completion". That is, does:
WebIDL.DOMString() === "";
//or
WebIDL.DOMString() === "undefined";
Calling String constructor results in an empty string:
String() === ''
Good question. I think it's up to us to define that.
yeah, I see what you mean. There might be some strange cases like:
void doSomething(DOMString baz, optional DOMString foo);
In the above case foo would not matter as it would need to be handled by the author as missing. In cases where it is not optional (baz), missing would cause an exception - so that solves that :)
Implementation complete and ready for review: https://github.com/extensibleweb/webidl.js/blob/master/lib/types/DOMString.js
reviewed, ok
Thanks @FremyCompany!
Reopening as it's lacking documentation.
http://www.w3.org/TR/WebIDL/#idl-DOMString