[Seaside] Better selectors for jQuery script builders
Esteban A. Maringolo
emaringolo at gmail.com
Mon Sep 11 14:41:45 UTC 2017
Hi all,
>From some time now, I want to have a consistent naming criteria for the
selectors that return a JSObject or a JSFunction, and I'd like to know
other ideas about naming them.
I name all the HTML rendering methods with the `renderSomething...On:`, so
"render" is always the prefix and the canvas (html) the last argument
(being it a single argument, or more than one).
And because of that I don't want to use 'render' as a prefix for the
methods that create a script.
So lately I'm using the "create...On:" pattern for these selectors.
E.g. when you have something like:
renderContentOn: html
html anchor
onClick: (self createClickScriptOn: html);
with: 'Click to toggle'.
createClickScriptOn: html
^(html jQuery id: 'foo') toggle
What is your criteria, if any, for this?
Regards!
Esteban A. Maringolo
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.squeakfoundation.org/pipermail/seaside/attachments/20170911/512e69f3/attachment.html>
More information about the seaside
mailing list