tern-browser-extension is a tern plugin which extends browser.json and provides the following features :
The plugin extracts JavaScript code from scripts tags, before creating the acorn AST.
The plugin also resolves script tags with the src
attribute and HTML Imports.
- get completion for element ids when document.getElementById is used:
- go at the definition of the attribute id :
- validate element id if the editor supports tern-lint :
- returns the well HTML element instance (eg : HTMLInputElement) when getElementById or createElement is used.
- get completion for CSS ID selector when document.querySelector is used:
- validate syntax of CSS selector if the editor supports tern-lint :
- get completion for Event type when document.addEventListener is used:
- validate existing of Event type if the editor supports tern-lint :