JavaScript Framework fairy support js
Single component initial processing

Initial processing

Let's change src/js/components/sample/controller.js to the following.

export class Sample {

    constructor() {

    init(data) {

    sample_input(event) {
        for (const item of this.list.values()) {
            item.textContent =;


view.html and controller.js are not yet binded in the constructor
When view.html and controller.js are binded together, the framework calls the init method. The argument of the init method is an object that can be used with the variable name v in view.html.

Next page Unique component

table of contents