I have seen, that you have a demo with html (mode). In this demo if you type some javascript anywhere (inside html content), altough js must be inserted inside script tag:
<html>
var s = "";
<script>
// here completion for s is available, although it should not.
</script>
</html>
To fix this problem you could integrates https://github.com/angelozerr/tern-browser-extension which parse your HTML with SAX and extract JS code from script tags. It gives you more features than completion for HTML elements ids, CSS selectors and event types.
I have seen, that you have a demo with html (mode). In this demo if you type some javascript anywhere (inside html content), altough js must be inserted inside script tag:
To fix this problem you could integrates https://github.com/angelozerr/tern-browser-extension which parse your HTML with SAX and extract JS code from script tags. It gives you more features than completion for HTML elements ids, CSS selectors and event types.