Re: Allowed Element property value's?

2013-07-04 Thread Ed Bras
@David: thanks for the short and clear explanation. I googled a bit more, and did find this also useful: LINKE -- You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group. To

Re: Allowed Element property value's?

2013-07-04 Thread David
Hi, Attributes are part of the html markup (tag attributes). Parameters are object parameters of the DOM JavaScript object. David On Thu, Jul 4, 2013 at 10:19 PM, Jens wrote: > > A bit confusing this Property/attribute thing... >> > > Yeah. Nice link. > > I think I haven't got it right either

Re: Allowed Element property value's?

2013-07-04 Thread Jens
> A bit confusing this Property/attribute thing... > Yeah. Nice link. I think I haven't got it right either but at least getAttribute works. Also if you name the attribute 'data-key' I think you have to use getPropertyString('dataKey'). -- J. -- You received this message because you are s

Re: Allowed Element property value's?

2013-07-04 Thread Ed Bras
That did the trick ;).. Thanks, it works when using getAttribute(). I tried that before, but got an exception because I was doing a getAttribute() on a text Note (using instanceof Element instead of Element.is(..) ;). And from this stackoverflow post, I thought that I should use getProperty() afte

Re: Allowed Element property value's?

2013-07-04 Thread Jens
To be more precise: You can use getProperty() for actual properties like id. A list of all properties of a DOM element: https://developer.mozilla.org/en-US/docs/Web/API/element For everything else you have to use getAttribute(). -- J. -- You received this message because you are subscribed t

Re: Allowed Element property value's?

2013-07-04 Thread Jens
Oh, just realized that you have used getPropertyString(). You better use getAttribute(). -- J. -- You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group. To unsubscribe from this group and stop receiving emails from it, send an email to google-web

Re: Allowed Element property value's?

2013-07-04 Thread Ed
> > > Try rename it to data-key. As of HTML5 the "data-" prefix should be used > for custom attributes. Hmmm.. I was sure this would work, but doesn't :( I see this: > But get this: > element.getPropertyString("data-key") -> null Can somebody try this? Note: It concerns a HTMLPanel th

Re: Allowed Element property value's?

2013-07-04 Thread Jens
Maybe 'key' is some sort of reserved attribute. Try rename it to data-key. As of HTML5 the "data-" prefix should be used for custom attributes. -- J. -- You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group. To unsubscribe from this group and stop

Allowed Element property value's?

2013-07-04 Thread Ed
While debugging, I have a dom Element that looks like (Element.toString()): > > When reading the property value I get the following: > element.getPropertyString("id") -> "_TxMrk_19" > element.getPropertyString("key") -> null Why does reading the "key" property value returns in null? (I wou