problem accessing content in html view

Ahh, okay. Looks like the problem here is that both the script and the custom HTML are mounted at the same time – so when the script is executed, there’s no .text_content <div> yet.

In most cases, the custom JS would be wrapped in a function and triggered by a user action, e.g. a button click. This makes it easier, because by the time the function is called, the DOM note you want to reference will be available:

<button onclick="doSomething()">Do something</button>
function doSomething() {
    var t = document.querySelector('.text_content');
    // etc.
}

Alternatively, the app also dispatches the custom event prodigymount when the HTML interface is mounted, so you could also try something like this:

document.addEventListener('prodigymount', event => {
    var t = document.querySelector('.text_content');
})