trullock / NUglify

NUglify is a HTML, JavaScript and CSS minification Library for .NET (fork of AjaxMin + new features)
Other
396 stars 79 forks source link

Expected ';' when using javascript class #263

Closed rochapablo closed 3 years ago

rochapablo commented 3 years ago

Doesn't work

class App {
    element;

    constructor(element) {
        this.element = element;
    }

    getByClass(value) {
        return this.element.parentNode.getElementsByClassName(value)[0];
    }
}

Work

function App (element) {
    this.element = element;
};

App.prototype.getByClass = function (value) {
    return this.element.parentNode.getElementsByClassName(value)[0];
};
trullock commented 3 years ago

This is the same as #235 I hope to tackle this in the next few weeks when I have some free time. pRs welcome in the meantime

trullock commented 3 years ago

Closing this as its basically #235, which I'm working on a fix or now