Questions tagged [polymer-3.x]

294 questions
29
votes
4 answers

Relative references must start with either "/", "./", or "../"

I am newbie to lit-element, and when use import to include the library, I am getting error as: Uncaught TypeError: Failed to resolve module specifier "lit-element". Relative references must start with either "/", "./", or "../". Please provide…
Senthil
  • 961
  • 1
  • 8
  • 21
26
votes
8 answers

Uncaught DOMException: Failed to execute 'define' on 'CustomElementRegistry': this name has already been used with this registry

Uncaught DOMException: Failed to execute 'define' on 'CustomElementRegistry': this name has already been used with this registry at http://127.0.0.1:8000/components/@polymer/polymer/lib/elements/dom-module.js:175:16 Tried deleting node-modules…
bhagya
  • 279
  • 1
  • 3
  • 4
14
votes
1 answer

How to Detect the device level Notification ON or OFF using javascript for PWA Application?

My requirement is how to detect the device level notification on/off in android device using javascript (don't use any kind of plug-in only you can use plug-in if this plugin support to PWA application). As per if notification off I need to show the…
10
votes
2 answers

Import external stylesheets in polymer 3

Is there a way to import external css files that only affects the shadow DOM? I am working with sass and creating the css files automatically, so any tricks using javascript imports can't be done. Right now, what I have is: static get template()…
9
votes
1 answer

How to add mixin for height in mwc textfield?

I am using polymer 3 and lit-element(2.2.1). The version of mwc-textfield is 0.13.0. I have read the documentations related to this version.In this documentation, I have found that we can add mixin for height. I had tried several ways but did not…
Himabindu
  • 634
  • 8
  • 22
9
votes
3 answers

Correct way to use Polymer 2 elements in Polymer 3 element?

How can I use Polymer 2 elements in Polymer 3 element? The following doesn't work since element doesn't work inside shadow dom. static get template() { return '
Kibeom Kim
  • 471
  • 1
  • 5
  • 12
8
votes
3 answers

How to import non-module(!) JavaScript into Polymer 3.0

Polymer 3 uses import to load external Javascript. For example import {GoogleCharts} from 'google-charts'; However, it seems for this to work, the external library should use exports. I am trying to use mapbox-gl.js library. This library, installed…
anneb
  • 5,510
  • 2
  • 26
  • 26
8
votes
6 answers

How to use Font Awesome with Polymer LitElement

I can't get the Font Awesome icons to work with LitElement, because CSS styles don't pierce the shadow boundaries of custom elements. Is it possible to use Font Awesome or other icons with LitElement?
grohjy
  • 2,059
  • 1
  • 18
  • 19
8
votes
2 answers

Polymer component template minification

I'm looking for a way to minify the white space in template literals. Since regular js minification wouldn't remove white space on a template literal I was expecting that maybe polymer-cli had a way to minify those. An example of the result of…
fernandopasik
  • 9,565
  • 7
  • 48
  • 55
8
votes
3 answers

Import template from separate html file in polymer 3

Instead of return "HTML CONTENT"; I have a separate html file and I want to import it to my js file to return the content of it but import template from '/m-chip.html"; does not work. element.js import {Element as PolymerElement} from…
Nima Tahmasebi
  • 141
  • 2
  • 13
6
votes
1 answer

LitElement Dot with HTML elements attribute/property

I am learning web components using Polymer. I am a beginner in web development. How can I understand what does dot notation means in .checked attributes or property of HTML element?
user2914606
  • 61
  • 1
  • 2
6
votes
1 answer

Polymer 3 - Is there a way to extract the html template into a separate html file?

I am trying to extract the HTML template from my Polymer component into a standalone HTML file. For Polymer 2 i found some examples, but they don't work for my Polymer 3 project. I tried something like the following, but it fails. import * as…
Torsten
  • 61
  • 3
6
votes
4 answers

Polymer 3.0 Uncaught DOM Exception When using Paper-Input

When Using paper-input, the import throws the following exception Uncaught DOMException: Failed to execute 'define' on 'CustomElementRegistry': this name has already been used with this registry. I haven't done anything besides creating the…
6
votes
2 answers

Import Polymer 2 components in Polymer 3

I am developing a web component using Polymer v3, and need to include some custom elements defined in legacy Polymer 2 components in the template HTML of my new component. Since HTML imports are no longer supported in Polymer 3, what approach…
codebox
  • 19,927
  • 9
  • 63
  • 81
5
votes
2 answers

How do you push Application updates on an installed PWA application?

My question is, Is it possible for the Users to acquire these changes without having to REINSTALL the PWA application? I have a PWA application deployed in Production. The client already installed the deployed PWA application in their MOBILE devices…
1
2 3
19 20