I found few scraps of info about the ability to show/hide/toggle element visibility via tap event in Accelerated Mobile Pages. It is mentioned in the docs as a global show/hide/toggleVisibility actions. There is also an example here how to use it.
The thing is it does not work in current state - at least for me. Brief test of the example above (see: https://plnkr.co/edit/CspuKe1I5LHTdHBWB3Cn?p=preview) gives me a bunch of Action Error: Target element does not support provided action in [tap:normal-element.show] on [[object HTMLDivElement]]
errors.
Am I missing something? How can I use global show
/hide
/toggleVisibility
actions on elements like <div id="my-element">Hi</div>
?
I posted an issue about this on GitHub where someone kindly replied to my question: https://github.com/ampproject/amphtml/issues/8035
TL;DR is that at the time of writing the update with those features is coming out in a week or so.