Skip to content

Commit

Permalink
fix(playground): always set language to trigger the tree-sitter langu…
Browse files Browse the repository at this point in the history
…age onChange event (#12)

* Update index.html

set default language to `yaml` by `js`, because use html set the default select value  does't trigger  the `tree-sitter.js` onChange event

* fix: 🐛 fix problem select change event does not trigger macos
  • Loading branch information
IWANABETHATGUY authored Oct 1, 2020
1 parent 5a437c8 commit a9e323c
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -117,3 +117,9 @@ <h4>Tree</h4>
src="https://code.jquery.com/jquery-3.3.1.min.js"
crossorigin="anonymous">
</script>
<script>
let select = document.getElementById('language-select')
select.value = 'yaml'
select.dispatchEvent(new Event('change'))
</script>

0 comments on commit a9e323c

Please sign in to comment.