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.

贡献者指南