Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Typically in Infusion, all functions and components adhere to a "that-ist" approach. However This approach implies that the meaning of any function value remains the same, however the function is invoked. This is in contrast to the "this-ist" approach used frequently in JavaScript code, where the context of a function (the value of this within its body) depends on where the caller has stored it before invoking it. When working with Infusion, there are times when you will need to interact with a library and or function that requires a "this", which is a keyword typically intended to refer back to itself. The most common example would be using a jQuery element.

For more details on the differences between "that-ist" and "this-ismist" approaches, as well as the reasoning behind why Infusion employees employs the former, see the About this and that blog post.

...

PropertyDescription
"this"

The "this" required by the function; the object that the function will be called on. Note that this property name must include the quotes (" ").

e.g. a jQuery object

method

The name of the function to be called.

e.g. a jQuery function like "click"

args(optional) The argument or array of arguments to be passed into the function. This can include IoC referencesReferences and expanders, in addition to strings, objects, booleans, etc.
namespace(optional)

...