Tern & Browser Extension support - angelozerr/tern.java GitHub Wiki

tern-browser-extension provides a tern plugin which is able to use tern inside HTML and provides advanced features for Browser like completion, hyperlink, validation for :

  • HTML element ids:

Browser Extension Completion

  • CSS selectors:

Browser Extension Completion

  • Event types:

Browser Extension Completion

After installing and converting your project as Tern Project, go at Tern project property, click on Tern / Modules item and select the Browser Extension tern plugin (ECMAScript, Browser tern plugins must be selected too) :

Check Browser Extension Plugin

HTML element ids

Completion for HTML element ids

Browser Extension Completion

Hyperlink for HTML element id

You can go at definition to HTML element id.

Browser Extension Hyperlink

Validation for HTML element id

If you activate tern-lint you will benefit with HTML elements id validation :

Browser Extension Validation

CSS Selectors

Completion for CSS Selectors

Browser Extension Completion

Hyperlink for CSS Selectors

You can go at definition to HTML element id.

Browser Extension Hyperlink

Validation for CSS Selectors

If you activate tern-lint you will benefit with validation for CSS selectors syntax, HTML elements id validation :

Browser Extension Validation

Event types

Completion for Event types

Browser Extension Completion

Hover for Event types

You can hover the string event type to show some informations:

Browser Extension Hyperlink

Validation for Event types

If you activate tern-lint you will benefit with validation for Event types validation :

Browser Extension Validation