Hi all,
I'm experimenting to add html5 drag/drop features to Seaside. The html5 spec says that all draggable elements need to declare the attribute "draggable" with the value "true". Whenever I try to write that attribute using Seaside: aListItem attributeAt: 'draggable' put: 'true' it will output: <li draggable="draggable"></li> However, that does not make it work. The value needs to be 'true'. I notice this is explicit encoding behavior on WAHtmlAttributes if the value is the boolean true. But I explicitly pass the string 'true' and I cannot immediately find where this is automagically converted to a boolean. What would be the way to make this work? Johan_______________________________________________ seaside-dev mailing list [hidden email] http://lists.squeakfoundation.org/mailman/listinfo/seaside-dev |
On Sun, Sep 23, 2012 at 2:22 PM, Johan Brichau <[hidden email]> wrote:
> Hi all, > > I'm experimenting to add html5 drag/drop features to Seaside. > > The html5 spec says that all draggable elements need to declare the attribute "draggable" with the value "true". > Whenever I try to write that attribute using Seaside: > > aListItem > attributeAt: 'draggable' put: 'true' > > it will output: > > <li draggable="draggable"></li> > > However, that does not make it work. The value needs to be 'true'. > I notice this is explicit encoding behavior on WAHtmlAttributes if the value is the boolean true. But I explicitly pass the string 'true' and I cannot immediately find where this is automagically converted to a boolean. > > What would be the way to make this work? draggable: aBoolean "<reference to spec why it needs to be a string>" self attributeAt: 'draggable' put: (aBoolean ifTrue: [ 'true' ] ifFalse: [ 'false' ]) Cheers Philippe _______________________________________________ seaside-dev mailing list [hidden email] http://lists.squeakfoundation.org/mailman/listinfo/seaside-dev |
Hi Philippe,
That is what I do but in between the setting of the attribute and its encoding on the document, the value get magically converted from a string to a boolean. I verify the value in the attributes dict right after setting it: it is a string. When I verify its value when the dict is encoded, it has been converted to a boolean. Johan On 23 Sep 2012, at 14:37, Philippe Marschall wrote: > draggable: aBoolean > "<reference to spec why it needs to be a string>" > self attributeAt: 'draggable' put: (aBoolean ifTrue: [ 'true' ] > ifFalse: [ 'false' ]) _______________________________________________ seaside-dev mailing list [hidden email] http://lists.squeakfoundation.org/mailman/listinfo/seaside-dev |
On Sun, Sep 23, 2012 at 2:49 PM, Johan Brichau <[hidden email]> wrote:
> Hi Philippe, > > That is what I do but in between the setting of the attribute and its encoding on the document, the value get magically converted from a string to a boolean. > > I verify the value in the attributes dict right after setting it: it is a string. > When I verify its value when the dict is encoded, it has been converted to a boolean. Oops, that shouldn't happen. Cheers Philippe _______________________________________________ seaside-dev mailing list [hidden email] http://lists.squeakfoundation.org/mailman/listinfo/seaside-dev |
argh, never mind... it's my stupid mistake: the attribute was overwritten later on in the rendering process (some code I forgot to delete).
sorry for the noise On 23 Sep 2012, at 16:00, Philippe Marschall wrote: > Oops, that shouldn't happen. _______________________________________________ seaside-dev mailing list [hidden email] http://lists.squeakfoundation.org/mailman/listinfo/seaside-dev |
Free forum by Nabble | Edit this page |