Questions tagged [polymer]
The Polymer library provides a set of features that make it easy and fast to make custom elements that work like standard DOM elements.
8,268
questions
0
votes
0
answers
13
views
Get Element out of Shadow DOM or use styles of main site
I'm working in a project which uses Polymer (still on 1.7, we'll relaunch using a different technology instead of upgrading...) and I'm supposed to check out the possibilities to make it work together ...
0
votes
0
answers
15
views
how to hide drop down list in poymer-js
I need to hide dropdown-menu. i tried .hidden property but it is not working
<paper-dropdown-menu id="firmChannelFilter" hidden="${(this._channelFilterVisibility)}"
...
0
votes
0
answers
18
views
my polymer ide is unable to analyze my jsx files or main app.js file
screen shot
this is my first ever react app am following a simple tutorial.
and for some reason i keep getting errors for every jsx file i create although the tutorial am following doesn't have them ...
0
votes
0
answers
58
views
Vaadin 14 and Highcharts integration
I have a Vaadin14-based project with Polymer3 components.
I created a small wrapper for Highcharts HighStock component without using embedded Vaadin Charts.
Now I need to add a stock-tools panel to ...
0
votes
0
answers
11
views
How to resolve polymer import issue
I am getting this error when run the polymer application. So, How to resolve this issue
"Cannot use import statement outside a module".
If anyone know the answer please help to resolve ...
0
votes
0
answers
12
views
How to append template in polymer 3
Trying to append template in the html, but not working, this is a simple concept but not working i am new in polymer 3. So, How to get solution for that.
constructor() {
super();
const ...
0
votes
0
answers
10
views
How to set template content in polymer
Trying to append component in the template but not working. How to append the component in the template using polymer.
import { PowerSector } from '../components/powersector';
public data = [];
...
2
votes
0
answers
35
views
Web scraping site using polymerjs / webcomponent
I'm using colly to web scrape youtube charts. This site use polymerjs and as a result, I'm having issues to capture the DOM elements. A simple test I did was document.querySelector("#search-...
0
votes
0
answers
217
views
how to trigger or click this button which uses aria-expanded to display a modal via console
So I tried to use document.querySelector('.d2l-contextmenu-ph').attr("aria-expanded","true"); to basically click the button "hh" button. It doesnt work for me, so can ...
0
votes
1
answer
45
views
Javascript function inside polymer is not a function error
I have a javascript function defined in polymer as such:
myTest(arg) {<do stuff here>}
Inside this function, based on some conditions, I want to change the onclick of a button defined in the ...
0
votes
1
answer
108
views
Vaadin 14 convert Polymer component to Lit with TypeScript
I use Intellij IDEA and Vaadin 14.
How can i convert simple Polymer component to Lit with TypeScript?
I want to learn how to create Lit with TypeScript in order to upgrade project to latest Vaadin LTS,...
-1
votes
1
answer
75
views
AudioWorkletProcessor and Polymer 3.4.1 and 'window' not defined
Trying to use lit element/Polymer Web components AND an Audioworklet/AudioWorklet processor, I got this error:
boot-c9e09360.js:20 Uncaught ReferenceError: window is not defined
at boot-c9e09360.js:20:...
0
votes
0
answers
101
views
Failed to resolve module of Polymer 3 in Electron v.17 application
I get electron-quick-start and electron-polymer from fluidnext to use for my Polymer 3 application.
When i try to import my webcomponents to the project, i have got this error: Uncaught TypeError: ...
1
vote
1
answer
64
views
JS method not defined
I want to use a java-script method in a polymer Template. I am using Vaadin with Polymer Elements. In my Project I have a Vaadin-Grid of Objects that can be of different type. I want to render these ...
0
votes
1
answer
245
views
RDkit fingerprint
I have 100 polymers and I want to compare their solubility by their fingerprint.
By using rdkit I reach a list of bits for each polymer like as [39, 80, 152, 233, 234, 265, 310, 314, 321, 356, 360, ...
1
vote
0
answers
37
views
how to implement menu navigation in polymer js
I am new to polymer js
I tried simple polymer application using menu navigation for home ,about and gallery page
index.html page
<html>
<head>
<script src="node_modules/@...
0
votes
0
answers
32
views
How do I decode characters from strings in polymer data binding?
Problem:
I am currently working with polymer data binding and I have an apostrophe character that is showing up as \x27 on the client side. On the server side I'm sending back the data with owasp's ...
0
votes
1
answer
292
views
Leaftlet: Adding feature overlay to control, dynamically
I need to add a FeatureGroup to the overlays list. I do add some overlays when instantiating the Leaflet map, but I now need to append a FeatureGroup dynamically, ie. based on some run time conditions....
2
votes
2
answers
402
views
Detect click outside of the current web component
I have a web component (Polymer 3) that is embedded in other components and want to "sense" clicks outside of it. For example, in React I would do something like this inside of the component:...
0
votes
0
answers
65
views
Vaadin 14 Polymer element this.dispatchEvent is not a function
I'm trying to write a Polymer Wrapper on top of leaflet and leaflet-draw. I've managed to create the map and the drawing toolbar but I'm unable to send events to the server using the dispatchEvent ...
-1
votes
1
answer
325
views
How to edit #shadow-root (user-agent) value in selenium with Python
My working environment is Python, Chrome, Selenium
I want to edit shadow-root (user-agent)'s value
<div class="divclass">
<input type="tel" id="mytel" ...
0
votes
0
answers
43
views
paper-menu-button in vaadin 14 lit template animation error
Starting from here vaadin-item @click event in lit template I replaced the
<vaadin-dropdown-menu label="Page Size">
<template>
<vaadin-list-box>
<vaadin-item ...
0
votes
0
answers
123
views
Stripe Elements cannot be mounted in a ShadowRoot. Please mount in the Light DOM
I have been using Stripe for my lit element project. The mounting the card element doesn't works at all. Here is my code sample that I am using
import { LitElement, html, css, property, query } from &...
2
votes
3
answers
3k
views
How to handle and pass events to the lit component from defining component
I am trying to design web components using lit Element and I need an help regarding the events.
As we can see from the attached snippet we could use @change="${this.handleEvent}" in html ...
0
votes
0
answers
67
views
display pre-selected form values not 'stick' on on-change event in Polymer JS
This is in Polymer JS. onchange is actually on-change.
I have a dropdown, with two items to select. Each item (commercial = 2, residential = 1) has specific fields in the DOM-repeat portion of the ...
2
votes
1
answer
321
views
Vaadin Flow - how to add a custom icon set?
I am using vaadin flow v21. I like to create a custom component which is using an own svg icon set. I tried to create the set based on the vaadin-icon but the svg definition will not be copied over ...
1
vote
2
answers
111
views
Advanced search in Javascript
I try to implement a search bar in a project.
It should just search for the entries and hide the rows, when the input doesn't match.
This is what I did and it's working.
_searchCalls() {
let ...
0
votes
0
answers
21
views
Polymer keyboard shortcuts interfering with existing enter functionality on radio buttons
I am working on adding the keyboard shortcut ctrl+enter to submit to a plugin using A11y keys for work-- basic layout is paper-radio-group with empty selections allowed and a submit button within an ...
0
votes
0
answers
48
views
Polymer 3.0 searching
I came to the point where I really need your help.
I will try to explain what I'm doing. I'm doing an internship
and I need make a call journal.
I need to implement it with Polymer, so far so good.
I ...
1
vote
1
answer
179
views
Version conflict - Uncaught DOMException, the name "mwc-icon" has already been used with this registry. Custom Component
I'm trying to use Material Custom Component and also using some other components. But I have version conflict Uncaught DOMException.
Uncaught DOMException: Failed to execute 'define' on '...
0
votes
0
answers
61
views
Import html from a cdn?
This may be a stupid question, but I am doing a proof of concept for a feature which would be used in a polymer component (later be migrated to Lit).
So, the use case is quite a simple one. As the ...
0
votes
1
answer
634
views
How to handle click event and append HTML in Lit-Element?
Trying to create a list using every button click.
I want to append the li tag in the ul element. OnClick I have created the addList function.
Handle click event.
Here is the code.
render() {
...
0
votes
0
answers
132
views
Working with DOM properties like scrollHeight, scrollTop in shadow DOM
working with LitElement and in shadow dom. I used to have this code in light dom:
const {scrollHeight,scrollTop,clientHeight} = document.documentElement;
When I switched to using shadow dom, this....
0
votes
2
answers
399
views
Hidding api key in front end application
I am using polymer js for front-end and I am having a file where I am using google-map API how can I hide the API without using "dotenv" .I am using loopback framework.
How can i store the ...
1
vote
1
answer
238
views
Vaadin 14 components not show up / not visible
I'm developing new module in our application using vaadin14 components (eg https://vaadin.com/components/vaadin-date-picker). Everything worked pretty well, but after adding few components (text ...
0
votes
0
answers
59
views
Polymertemplate instantiation time
I'm using a library that in its main class extends PolymerTemplate where I noticed that the creation of an instance of the component in the library takes about 20ms.
I've removed basically everything ...
0
votes
1
answer
65
views
How to locate elements for validator.ampproject.org to automate amp validation using Selenium and Java/JS?
This type of tags are present in the UI. I want to automate to put URL in required field in UI and validate the status.
1
vote
1
answer
139
views
Polymer/Lit-Element - Braintree gateway integration - Web Component problem
I am trying to integrate Braintree payment gateway to Vaadin 14 which is using Polymer for its frontend.
Basically we have a custom Vaadin front-end view to load script https://js.braintreegateway.com/...
2
votes
3
answers
122
views
What does .$ mean in javascript
I was in the console trying something when i saw that the .$ can be used along with the document object to access the elements. But i don't know what it actually does.
example :-
0
votes
0
answers
210
views
how to add lit-elements in nuxt js
*****[Vue warn]: The client-side rendered virtual DOM tree is not matching server-rendered content. This is likely caused by incorrect HTML markup, for example nesting block-level elements inside
, or ...
1
vote
1
answer
584
views
"Module parse failed: Unexpected character '@'" when using lit component with NextJS
I try to import a lit component in my NextJS project.
Here is my component:
import {html, css, LitElement} from 'lit';
import {customElement} from 'lit/decorators.js';
@customElement('my-element')
...
1
vote
3
answers
238
views
Using html function outside component returning [object Object] LitElement
I'm having headaches with this, if someone knows how to solve it, will be awesome.
I'm using LitElement to create a table component, the developer that wants to use it can add a customHTML to render a ...
0
votes
1
answer
458
views
update member of LitElement for the refreshing of the rendering?
My extended LitElement class has variable members, the values of which could be changed at any time. The rendering depends on several of them. I'd like know, which update() member function should be ...
0
votes
1
answer
128
views
Web components community polymer web components
If I look at the polymer shop I am instantly sold on wanting to use this as a starter for my web shop. Not just because it's already a web shop (full pwa technology) but because it has excellent (...
1
vote
2
answers
655
views
where to define selector document.querySelector in LitElement?
A selector class is defined in css:
static get styles() {
return css`
.selector select {
font-size: 1.125rem;
color: #fff;
position: absolute;
top: 0;
left: 0;
right: 0;
bottom:...
0
votes
1
answer
25
views
Fit paper-input to div?
My paper-input is extending outside of the parent div, and I don't know why. I've tried setting the bottom margin but it does nothing. Here's what I have, the borders are for testing and will be ...
0
votes
1
answer
343
views
Blur event is firing on keydown
I need to get an input value on enter press and also on blur event. So I have created 2 functions:
<input @blur=${this._setNameByBlur} @keydown=${this._setNameByEnter}/>
Handling blur event
...
0
votes
1
answer
31
views
Polymer paper-dropdown-menu not appearing correctly
I'm trying to set up some Polymer modules for a project I'm working on. In the code below, the button works just fine but when I import the dropdown, it appears weirdly. This code comes straight from ...
0
votes
1
answer
24
views
How to install polymer3?
Following the instructions from Polymer site Polymer has been seemly properly installed on my Win10 machine. However outcome of polymer --version is 1.9.11 instead of 3.x.
How could polymer be ...
0
votes
0
answers
44
views
DY-graph xaxis range labeling
I am trying to label xaxis lable range in uniform format. currently I am getting the xaxis labels as below.
But I want this to be represented in format like "20:00 21:00 23:00 'next day Date' 01:...