Vscode: [html] provide rename for embedded JavaScript

Created on 20 Jul 2017  路  2Comments  路  Source: microsoft/vscode

  • VSCode Version: v1.14.1
  • OS Version: macOS Sierra v10.12.6
  • Reproduces without extensions: Yes

Steps to Reproduce:

  1. Create these two files:

my-custom-element.js

class MyCustomElement extends HTMLElement {
  static get is() {
    return 'my-custom-element';
  }
}

customElements.define(MyCustomElement.is, MyCustomElement);

my-custom-element.html

<script>
  class MyCustomElement extends HTMLElement {
    static get is() {
      return 'my-custom-element';
    }
  }

  customElements.define(MyCustomElement.is, MyCustomElement);
</script>
  1. Try the Rename Refactoring with F2 in both files:

screen shot 2017-07-20 at 17 48 44

screen shot 2017-07-20 at 17 48 57

With the same code, the "Rename Refactoring" doesn't work in HTML language.

feature-request html

Most helpful comment

It could be great to have the same behavior inside script tags than we have in JS files. Like this one @abdonrd days and jsdocs comments per example.

All 2 comments

Rename is currently not provided inside embedded JavaScript. But you can use 'Change occurrences'

It could be great to have the same behavior inside script tags than we have in JS files. Like this one @abdonrd days and jsdocs comments per example.

Was this page helpful?
0 / 5 - 0 ratings