embroider-build / content-tag

A rust program that uses my swc fork to parse GJS
MIT License
7 stars 7 forks source link

Move component `this` reference into first argument #7

Closed mansona closed 12 months ago

mansona commented 12 months ago

You can see the change the easest in the diff for the test case. We went from:

class X {
    static {
        template("Hello", { eval() { return eval(arguments[0]) }}, this);
    }
}

to:

class X {
    static {
        template("Hello", { component: this, eval() { return eval(arguments[0]) }});
    }
}