20.2.1Instantiate a Brush
The Prototype and Scriptaculous package extends the Seaside class WARenderCanvas
with the methods prototype
and scriptaculous
that both return a factory object for JavaScript brushes. These factories are instances of PTFactory
. These brushes are responsible for creating well defined snippets of JavaScript code. A full listing of the available brushes is presented below.
For some Prototype and script.aculo.us functionality there are several aliases available. Seaside always tries to generate the shortest possible variation, however for reference it is often useful to know the long form as well. For example writing $('foo').toggle()
is a synonym for the slightly longer version Element.toggle('foo')
.