[Webkit-unassigned] [Bug 68610] Microdata: Basic implementation of document.getItems() method

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Oct 11 13:34:17 PDT 2011


--- Comment #15 from Sam Weinig <sam at webkit.org>  2011-10-11 13:34:16 PST ---
(In reply to comment #14)
> (In reply to comment #13)
> > (From update of attachment 110347 [details] [details])
> > View in context: https://bugs.webkit.org/attachment.cgi?id=110347&action=review
> > 
> > > Source/WebCore/dom/MicroDataItemList.cpp:58
> > > +    if (m_typeNames.contains("undefined") || !m_typeNames.size())
> > 
> > Are you trying to detect a case where the script didn't pass type? I don't think comparing it to the string 'undefined' is the right approach.
> Sam, do you know a better way of doing this? We have a function that takes DOMString and we want to detect a case where the author omitted the argument.

We usually handle this by adding a modifier to the string argument in the IDL which converts undefined to the null string [ConvertUndefinedOrNullToNullString].  If you need a different semantic, you either need to use [Optional] or [Custom].  Using the string "undefined" is clearly wrong, as you could pass that string.

Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

More information about the webkit-unassigned mailing list