Polymer/old-docs-site

importPath undefined

Open

#2.466 aberto em 6 de fev. de 2018

Ver no GitHub
 (5 comments) (0 reactions) (0 assignees)HTML (2.482 forks)batch import
2.xP2docsgood first issueneeds documentation

Métricas do repositório

Stars
 (1.013 stars)
Métricas de merge de PR
 (Nenhuma PRs mesclada em 30d)

Description

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

Guia do colaborador