Microsoft/vscode

[html] provide rename for embedded JavaScript

Open

#31,141 opened on 2017年7月20日

GitHub で見る
 (6 comments) (14 reactions) (2 assignees)TypeScript (74,848 stars) (10,221 forks)batch import
feature-requesthelp wantedhtmljavascriptkeep

説明

  • 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:

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

コントリビューターガイド