sciter-sdk/pysciter

Does tiScript affect script running

ylm-king opened this issue · 1 comments

In this code, the code in script is not executed.

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
    <h1 id="hello" t="zs">您好, 我的世界!</h1>
</body>

<script type="text/tiscript">
    $(#hello).on('click',
        () => {
            stdout.println("'点击事件调用成功。'")
            $(#hello).text = view.get_newName();
        }
    )
</script>

<script>
    document.querySelector('#id').text = '世界在转!'
</script>
</html>

Please confirm the problem

h1 is not a button. Replace it with <button> or <widget type=button /> or add h1#hello { behavior: clickable; } to your CSS.