[Seaside-dev] html5: draggable="true" ?
Philippe Marschall
philippe.marschall at gmail.com
Sun Sep 23 12:37:51 UTC 2012
On Sun, Sep 23, 2012 at 2:22 PM, Johan Brichau <johan at inceptive.be> 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
More information about the seaside-dev
mailing list