How can I uppercase small a's inside a Meteor template after rendering?
What I tried:
Meteor's LiveRange
object has a visit()
method. With it I can access all rendered DOM nodes of a template. For each DOM text node I modify its data in the visitor.
However! How to get the LiveRange
object for a template??
In the callback rendered()
for the template this
is the template instance. It has a LiveRange
object in a member called _spark_kEezuQToKtbuQw3Xw
or such. This looks like Meteor is disliking someone to access this member.
How can I get the LiveRange
object of a template in a way which pleases the Meteor gods?
And before you ask why I would do such a stupid thing as uppercasing all "a"'s: It's complicated. Actually I would like to execute a search-and-replace on all DOM text nodes in a template, because I am trying to apply a cross-cutting concern to several templates in a Meteor application.