Versions Compared

Key

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

...

Code Block
languagejs
fluid.defaults("fluid.tutorials.buttonHolder", {
    gradeNames: ["fluid.viewComponent", "autoInit"],
    selectors: {
        button: ".button"
    },
    members: {
        button: "{that}.dom.button"
    }
});

This is Declarative configuration is also the preferred approach for supplying arguments related to this component's DOM elements to Invokers and Event Listeners, as shown in the following example:

Code Block
languagejs
fluid.defaults("fluid.tutorials.buttonHolder", {
    gradeNames: ["fluid.viewComponent", "autoInit"],
    selectors: {
        button: ".button"
    },
    events: {
    },
    listeners: {},
    invokers: {
        button: "{that}.dom.button"
    }
});

Using the DOM Binder Programmatically

...