Polymer/old-docs-site

importPath undefined

Open

#2466 aperta il 6 feb 2018

Vedi su GitHub
 (5 commenti) (0 reazioni) (0 assegnatari)HTML (2482 fork)batch import
2.xP2docsgood first issueneeds documentation

Metriche repository

Star
 (1013 star)
Metriche merge PR
 (Nessuna PR mergiata in 30 g)

Descrizione

From @DarkSideOfMo0n on January 26, 2018 14:6

Description

Documentation says: import Path -> "A static getter on the element class that defaults to the element HTML import document URL and is overridable. It may be useful to override importPath when an element's template is not retrieved from a or the element is not defined using an HTML import." can be found here, section: URLs in templates

But it seems that when using a component with inline template this importPath property is undefined.

Live Demo

repo URL: https://github.com/DarkSideOfMo0n/import-path-bug

Steps to Reproduce

  1. git clone https://github.com/DarkSideOfMo0n/import-path-bug.git
  2. bower install
  3. polymer serve
  4. open index.html in browser
  5. inspect my-element -> importPath property is undefined

Expected Results

importPath property of my-element contains the path it was imported from

Actual Results

importPath property of my-element is undefined

Browsers Affected

  • [X ] Chrome
  • Firefox
  • Edge
  • Safari 9
  • Safari 8
  • IE 11

Versions

  • Polymer: v2.3.1
  • webcomponents: v1.1.0

Copied from original issue: Polymer/polymer#5064

Guida contributor