2008/8/31 Thomas Broyer [EMAIL PROTECTED] > > > Could someone from Google explain why there has been this diversion from > the > > path of 'least surprise'? > > Because that's how the DOM is defined: > http://www.w3.org/TR/DOM-Level-2-Core/core.html#ID-745549614 >
No it's not. w3.org's *recommendations" that you link to state that getAttribute() returns the string, or an empty string if the attribute is empty and there is no default. It doesn't appear here to recommend any return value if the attribute does not exist. > > > What suddenly became so wrong with returning what > > JS gives you? > > http://code.google.com/p/google-web-toolkit/source/detail?r=3568 > Apparently, not all browsers give you nulls. That doesn't explain the sudden change. > On Aug 31, 4:09 pm, "Ian Bambury" <[EMAIL PROTECTED]> wrote: > > And now I can't tell the difference between an attribute which is > missing, > > and an attribute which is there but empty... > > Blame Microsoft eventually at first... > Why is it Microsoft's fault that Google made the change? I'm quite happy to blame Microsoft for anything and everything that has ever or will ever happen (I don't want to look out of place here) but if there is a genuine connection, all the better. The bottom line for me is that IE, FF, Opera and Safari all return null in raw JavaScript if the attribute doesn't exist - I really don't give a monkey's about the other browsers that GWT supports (!?) - and since when have Google worried about being officially compliant over getting the job done? Ian --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/Google-Web-Toolkit?hl=en -~----------~----~----~----~------~----~------~--~---
