tapestry-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Thiago H. de Paula Figueiredo" <thiag...@gmail.com>
Subject Re: tapestry-5 git commit: TAP5-2225
Date Sun, 19 Mar 2017 19:31:56 GMT
On Sun, Mar 19, 2017 at 3:42 PM, Dimitris Zenios <dimitris.zenios@gmail.com>
wrote:

> My only concern is with
> /tapestry-core/src/main/preprocessed-coffeescript/org/
> apache/tapestry5/t5-core-dom.coffee
>
> +#if jquery
> +      value = $(element).data(attribute)
> +#elseif prototype
> +      value = JSON.parse($(element).readAttribute('data-' + attribute))
> +      if value isnt null
> +        value = JSON.parse(value)
> +      else
> +        value = {}
> +#endif
>
> What happens when not jquery neither prototype is used.Instead it should
> use the dom api.
>

Unless you're talking about running Tapestry without any traces of jQuery
nor Prototype, which isn't supported, then this won't be a problem. But you
raise an interesting point. :) I did research for a framework-free, vanilla
JS solution for reading data attributes, which actually exists (the DOM
dataset property, described in
https://developer.mozilla.org/en-US/docs/Learn/HTML/Howto/Use_data_attributes),
but it's not supported by Internet Explorer 10 and older versions. I'd love
to see Tapestry provide a vanilla JS infrastructure, but browsers,
specially IE, are not there yet.

-- 
Thiago

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message