tapestry-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From <no-re...@comments.apache.org>
Subject jric commented on http://tapestry.apache.org/javascript-modules.html
Date Sat, 04 Nov 2017 05:47:18 GMT
Hello,
    jric has commented on http://tapestry.apache.org/javascript-modules.html. 
    You can find the comment here:
    http://tapestry.apache.org/javascript-modules.html#comment_7084
    Please note that if the comment contains a hyperlink, it must be approved
    before it is shown on the site.

    Below is the reply that was posted:
    ~~~~
    This page describes how to define functions in my javascript module, and I can execute
those functions from Java code, which is super cool.  What is less obvious to a Java coder
like me (and no example shown in jumpstart either) is that once the module is defined that
returns the 'setup' function, I can also execute it from my template (instead of java code)
like so:

<div onclick="require('my-module').setup()">foo</div>

or even execute it against the current element with:

<div onclick="require('my-module').setup(this)">foo</div>

which is also cool and maybe not obvious to everyone.
    ~~~~

    With regards,
    The Apache Tapestry Project.

    You are receiving this email because you have subscribed to changes for the tapestry site.
    To stop receiving these emails, unsubscribe from the mailing list that is providing these
notifications.
	    

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tapestry.apache.org
For additional commands, e-mail: dev-help@tapestry.apache.org


Mime
View raw message