+=head2 GENERIC FUNCTION
+
+All of the following functions can be invoked in two ways: either by
+calling the function name directly on C<$self> or by calling
+L</action> with the function name as the first parameter. Therefore
+the following two calls are identical:
+
+ $js->insertAfter($html, '#some-id');
+ $js->action('insertAfter', $html, '#some-id');
+
+The second form, calling L</action>, is more to type but can be useful
+in situations in which you have to call one of two functions depending
+on context. For example, when you want to insert new code in a
+list. If the list is empty you might have to use C<appendTo>, if it
+isn't you might have to use C<insertAfter>. Example:
+
+ my $html = $self->render(...);
+ $js->action($list_is_empty ? 'appendTo' : 'insertAfter', $html, '#text-block-' . ($list_is_empty ? 'list' : $self->text_block->id));
+
+Instead of:
+
+ my $html = $self->render(...);
+ if ($list_is_empty) {
+ $js->appendTo($html, '#text-block-list');
+ } else {
+ $js->insertAfter($html, '#text-block-' . $self->text_block->id);
+ }
+
+The first variation is obviously better suited for chaining.
+