Skip to content

Improve support for Javascript in HTML #15377

Closed

Description

No description provided.

Activity

  1. gertcuykens commented on Nov 12, 2016

    @gertcuykens

    And typescript :D #14032 see comment

    The tsserver supports embedded js (and ts for this matter). VSCode will need to extract the script tag contents, and send them to the server. all other LS operations should work regularly from this point on. No work on the tsserver-side should be needed, so microsoft/TypeScript#11739 should be closed, and this issue reopened (unless there is another issue tracking this work on the vscode side).

    It is worth noting that this is hte same support that VS 2015 uses to drive intellisense and other Language Service features in empeded JS code in script tags.

  2. bgashler1 commented on Nov 19, 2016

    @bgashler1
    Contributor

    This would be great. I currently can only get intelliSense in my JS files—but not in HTML files with script tags.

  3. s130059660 commented on Nov 20, 2016

    @s130059660

    I'm using the latest insider 1.8 builds.
    Now, native js autocomplete works. However, imported modules don't.

  4. waderyan commented on Nov 21, 2016

    @waderyan

    Note - duplicate issue here #3465
    User feedback in comments.

  5. aeschli commented on Nov 23, 2016

    @aeschli
    ContributorAuthor

    Added single file support for JavaScript in HTML (no script includes are followed).

  6. JeremyBYU commented on Feb 9, 2017

    @JeremyBYU

    Is there a plan to allow intellisense for imported variables in <script> tags inside html files?

  7. aeschli commented on Feb 9, 2017

    @aeschli
    ContributorAuthor

    No, it's currently not on the plan. We first want to see how much the demand for more support for JavaScript inside HTML is. Please file issues or vote (add thumbs ups) on existing ones.

  8. SMotaal commented on Feb 16, 2017

    @SMotaal

    So, going over the various threads regarding <script ...> /* can we have syntax highlighting and autocomplete here please */ </script>, I see several issues, same requests, then why moving from one language service might have broken the feature (I assumed it was there), then what it might take to get it done (maybe), finally how this is a duplicate and now issue needs to be merged [rinse repeat ...]

    As an observer, who has been waiting for the feature but decided to observe, I think we need a better mechanism to communicate! I really do appreciate how much effort is involved to manage all those threads in a consistent manner, and let's not forget having to actually work on the project. So, maybe if we can think of a better system around unique features (and maybe sub-features or preferences) and have one place for people to vote.

    My opinion: this [reliable editing of scripts in tags, like scripts in files, and enough contextual awareness of the fact that the script is in this particular HTML] is important and there is enough justification to give it some importance.

    Thanks!

  9. arc41t3ct commented on Jul 24, 2017

    @arc41t3ct

    when opening the script tags with <script type="text/javascript"> intellisense works inside html files.

  10. locked and limited conversation to collaborators on Nov 18, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

plan-itemVS Code - planned item for upcoming

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions