Microsoft/vscode

[html] provide rename for embedded JavaScript

Open

#31,141 建立於 2017年7月20日

在 GitHub 查看
 (6 留言) (14 反應) (2 負責人)TypeScript (10,221 fork)batch import
feature-requesthelp wantedhtmljavascriptkeep

倉庫指標

Star
 (74,848 star)
PR 合併指標
 (平均合併 11小時 43分鐘) (30 天內合併 1,000 個 PR)

描述

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

貢獻者指南