Assuming I have a class `class FooBar() {}` with a method `doSomething(){}`, can I create and append a html element from within the class itself that calls `doSomething()` when clicked?. Here is a code snippet:

```
class FooBar{
    constructor(options){this.options = options}
    doSomething(){ /* onclick functionality */}
    creator(){
        let reference = `<div onclick="this.doSomething()"></div>`;
        document.getElementByTagName('body')[0].innerHtml = reference;

    }
}

```

I would now like to know the correct way of writing the `let reference . . .` line.