code-input
code-input copied to clipboard
TODO Add unit tests: `focus` and `blur` functions should be passed from code-input to textarea for consistency
Currently they are not passed and do nothing since code-input elements aren't focusable and making them focusable would be illogical. The consistency is with the focus event, selectionStart, selectionEnd, etc.
~~This isn't backwards compatible.~~ It is because anyone who focuses the code-input element will have expected the textarea to focus. There is no difference to screenreaders between the code-input and textarea being focused, and no other reason to focus the code-input. tabindex should be similarly synced.
TODO tests
Tests have been added to tests/hljs.html and tests/prism.html.