Now that there’s a system to cache and retrieve data attributes using Utils.GetData
and Utils.SetData
is it no longer possible for us to publicly access data attributes directly?
Although there’s a fallback in Utils.GetData
to get from the data attribute if the cache is empty, there’s nothing that actually sets the data attribute in the first place.
What I’m trying to do is access what was equivalent to:
var instance = $element.data('select2');
But this no longer seems to be possible.
Is there a public way of accessing the GetData
or SetData
functions?