Microsoft/vscode

[html] provide rename for embedded JavaScript

Open

#31.141 aperta il 20 lug 2017

Vedi su GitHub
 (6 commenti) (14 reazioni) (2 assegnatari)TypeScript (10.221 fork)batch import
feature-requesthelp wantedhtmljavascriptkeep

Metriche repository

Star
 (74.848 star)
Metriche merge PR
 (Merge medio 11h 43m) (1000 PR mergiate in 30 g)

Descrizione

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

Guida contributor