800 questions
1
vote
0
answers
111
views
Web component library using Lit return Failed to resolve module specifier "lit"
I created a new web component library project based on :
[email protected]
[email protected]
using Vite's library mode (see https://dev.to/receter/how-to-create-a-react-component-library-using-vites-library-mode-...
0
votes
1
answer
289
views
Modify CSS inside a Shadow DOM (Lit-Element)
I have a hidden DOM created by a third party. I want to configure the application of a bold style on the word "Power", considering that when the legend tag of "Power" is entered, ...
0
votes
1
answer
34
views
Trouble mutating an array with data fetched from axios in polymer 2
I am experimenting with Polymer 2 for work related reasons. I decided to make an infinite scroll. So far I know how to do it in other frameworks (such as VUE) but I am having a little bit of trouble ...
0
votes
1
answer
206
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
96
views
Polymer JS input value can be set however not being rendered in the UI
I have two fields called LegalName and OperatingName (field 1 and field 2). When a value is being added to id="legalName" an eventlistener should be added so when we focusout and tab to ...
0
votes
0
answers
111
views
How do I get mwc-icon-button working with font awesome?
I have the following...
<!-- Works -->
<i class="fab fa-linkedin" slot="actionItems"></i>
<!-- Does not work -->
<mwc-icon-button icon="linkedin&...
0
votes
1
answer
126
views
Polymer is not defined
I am trying to call a function on the click of paper-button in my polymer application.
But polymer throws error there:
I searched for the same error I found that we should import polymer.html.
I have ...
1
vote
1
answer
123
views
Polymer <dom-repeat> data binding to child element not working?
I have a snippit as follows to try to pass a property down to a child element as follows:
<dom-repeat items="{{employees}}" as="employee">
<template>
<child-...
0
votes
1
answer
340
views
Item inside <nuxeo-data-table-column> component passed to a function as an argument yields empty object
<nuxeo-data-table-column>
[[item.title]]
</nuxeo-data-table-column>
This works. Here 'item.title' renders title.
<nuxeo-data-table-column>
[[_callme(item)]]
</nuxeo-data-table-...
1
vote
0
answers
60
views
How can i prevent my draggable menu go outside a div in Polymer 2?
I have a draggable menu that i want it to be restricted within parent in Polymer 2
Here is my draggable function, i saw that there is a way to fix my problem using javascript vanilla but i tried with ...
0
votes
2
answers
34
views
Why does Webcomponent object value is shared between the different instances of the same webcomponent?
I created a web component called TestElement with Polymer as below. It simply has an object value and a function which adds values to this component.
<dom-module id="test-element">
<...
0
votes
1
answer
509
views
Chrome 80 polymer TypeError: Cannot read property '__proto__' of null
My Chrome is updated to Chrome 80 version.Then My site doesnot work gives below error:
My app use Angular 5,
My bower.json:
"webcomponentsjs": "webcomponents/webcomponentsjs#0.7.0",
" vendor....
0
votes
1
answer
203
views
Polymer 2 iron-selector selected element doesn't update after the dom changes order of elements
I have a component, which has 4 instances.
User clicks number 2, product B gets selected.
When the dom is re-ordered, later after he selects another option, these 4 instances of the component card-...
0
votes
1
answer
430
views
Polymer: on-click event on dom-repeat item is not identified in index.html
I have a polymer app with entry point index.html . For some reason i had to use dom-repeat inside index.html itself instead of a polymer element. The code is like this
<dom-bind id="mainbody"&...
0
votes
0
answers
74
views
Route not working if not basic url polymer
i am using this tutorial to use routes in polymer 2, i am setting route, and it's working fine when i run the standard url...
For example: testurl.com (this works)
After that, every single page i go ...
0
votes
1
answer
182
views
a11y polymer button doesn´t provide auditive feedback of button state
I have the following polymer element, that inherits the "paper-behaviors/paper-button-behavior" but doesn´t provide any kind of auditive feedback when the user clicks the button. it just reads the ...
0
votes
1
answer
54
views
Polymer2: how to share data from parent to deeply nested component?
I am wondering what would be the best idea in case of passing data from parent component to deeply nested component while is use Polymer2.
For example,
<a some-prop="1">
<b>
...
0
votes
1
answer
460
views
How can I know If a webcomponent is on screen in litelement?
Im doing a small proyect with litelement, but I want to fire an event when a webcomponent is shown, not only the first time, but every time that the component shows, how can I do that?
thanks in ...
0
votes
1
answer
102
views
query the all elements(queryselectorall) in a page in polymer 3 not working due to shadow element
Previously i used polymer 1, for some custom validation i have used following code with queryselectorAll to get the all invalid elements
var _formTag = this.$$("request-details").$$("#...
4
votes
1
answer
626
views
:host getting overridden by universal CSS selector
We have CSS resets (margin:0px;padding:0px;) in a common style file which we have authored as one component and have included as a part of other components which we are developing.
We are using ...
1
vote
1
answer
247
views
This AMD module is not loading in Chrome but it does in Firefox, Safari and IE11, why?
This code doesn't work in Chrome but it does in Firefox, Safari and IE11 (where IE11 is the target browser).
It's a lit-element Web Component inside another Polymer 2.x, all transformed into ES5 and ...
0
votes
2
answers
116
views
How to access a grandchild element's css mixin in Polymer?
I have a Polymer component that uses another component in its template (a buttons container). Said child component also uses another component (the button itself) and I need to add some style to that ...
0
votes
0
answers
43
views
How to define 'filter' on WCT?
how to read property 'filter' on WCT
I'm getting error when I run WCT "Cannot read property 'filter' of undefined"
How can we define a filter on WCT suites
0
votes
1
answer
296
views
How to set value of paper-dropdown-menu with Polymer
I am trying to set the value of a paper-dropdown-menu in Polymer, but am having issues.
The paper-item value does not match its innerHTML, so when trying to set it with Javascript, it displays a ...
0
votes
1
answer
558
views
Add observer dynamic on dom-if element
1) If I want to select element on dom-if condition and run observer how can I achieve that scenario i.e I have dropdown which is wrapped inside dom-if and on page load some observer is changing flag ...
0
votes
1
answer
62
views
Polymer 2.0 - Can you write to fs?
I'm working on an MVP for a project, and I'm trying to mock up a "database" quick and dirty. I thought for now I'll just put my "database" into a .json file and work with that. I am able to use iron-...
1
vote
2
answers
291
views
Cannot get element by id in Polymer 2
I have a problem with getting HTML element inside dom-repeat in a function.
At first I had this code and it worked OK.
HTML:
<div class="card">
<app-toolbar>
<paper-button on-...
0
votes
1
answer
69
views
Updating polymer 2 array of objects shows duplicate values?
I'm trying to update a paper-dropdown-menu. After the first time updating, I see the options array correctly shows the new item appended the array.
The issue happens for any subsequent additions to ...
0
votes
0
answers
231
views
How to change paper-dropdown-menu default color
I am trying to set the default paper-dropdown-menu color from gray to black.
Using several mixins, I haven't been able to successfully change the color.
<paper-dropdown-menu
label="Label"
on-...
0
votes
0
answers
122
views
Function after dom-repeat finished
I created new component in Polymer 2, inside that i will use 2 web components, component a for show name of div and lenght of components b who will run a dom-repeat inside this web component.
With ...
1
vote
1
answer
37
views
Component not displaying on web
I'm adding a new web page to my app using polymer2. I've already done similar adds before but this one really does not show on the page even tho i have the imports and the components ready...
I'm ...
-1
votes
1
answer
2k
views
Error code 134 on installing elements for polymer
I am trying to install paper elements for polymer, but i keep getting the error code 134
Install command i tried to run: npm install --save PolymerElements/paper-checkbox
Versions:
NPM 6.9.0
Bower 1....
0
votes
1
answer
65
views
How to call function every 60 seconds in Polymer 2.x
I wish to call a function in Polymer element every 60 seconds to autosave to persist a result in database (let's assume that DB operations will happen within 60 secs). How can this be achieved in ...
3
votes
0
answers
754
views
ReCaptcha v3 stalling out in Safari(Mac and IOS)
I've stuck ReCaptcha 3 in a polymer 2 app and it works great, except that in Safari, when I try to get the token, the call to grecaptcha.execute stalls. Every. Single. Time.
I've tried implementing ...
0
votes
0
answers
848
views
How to save changes to firebase document if user closes window or tab
Context: I have a use case where in the components used is firebase realtime database in Polymer 2.x. I have a function that does transformations on certain user activity with the firebase realtime ...
0
votes
0
answers
44
views
Weird behavior using dom-if template in a list element
I have a weird problem with the use of dom-if. I have a list of elements that displayed a status with different colors when something is failing and also displaying the count of children elements ...
0
votes
1
answer
60
views
What is the 'behavior' counterpart of Polymer 1.x in polymer 3.x
I am translating behavior component from Polymer 1.x to Polymer 3.x. My concern is how to translate my bevaior class to be used in Polymer 3 application. The test code follows below here:
...
0
votes
1
answer
222
views
Two sortable items dragged if trying to move just one card from the sortable group
I have implemented sortablejs in Polymer2.0 element. I am able to drag and drop the item from group. The issue I am facing now is that randomly, not sure why and how, but 2 cards or items gets moved ...
0
votes
1
answer
40
views
Why is dom-repeat not creating the template on array value?
I'm creating a dom-repeat module using Polymer 2. It is a simple array of objects.
I have tried using both one-way and two-way binding for the items attribute, i have tried adding and removing the "...
0
votes
1
answer
217
views
Polymer 2.0 dynamically assigned id to a <ul> in dom-repeat template returns null in observe method on a array using this.shadowRoot.querySelector()
I am trying to implement Sortablejs in Polymer2.0 app, where in I dynamically assign ids to the ul element in a dom repeat template.
The problem I have is I can't access the ul with id in the ...
1
vote
0
answers
1k
views
Remove a custom element definition Polymer [duplicate]
I'm building an app that stores custom elements in back-end. The front-end receives the HTML(and other) code of the custom elemnts via <link> tags. Something like this:
<link href="/...
3
votes
1
answer
615
views
Is it possible to pass data from Polymer component to Vue component?
The below code is what I'd like to do but it currently doesn't work. I'm trying to start building Vue components inside my Polymer app as a way to slowly migrate off Polymer.
I've been able to get a ...
0
votes
1
answer
974
views
When function is called from observer, error that “TypeError ... is not a function” happens
When function is called from observer, error that “TypeError ... is not a function” happens:
selected_project_id : {
type: Number,
observer: '_selected_project_idChanged'
}...
0
votes
1
answer
112
views
Get value of button in polymer
I'm trying to get the set value from a button to further procces this in my function.
<template is="dom-if" if="[[Student.Absence]]">
<td><button class="defaultbutton" value="[[...
1
vote
1
answer
820
views
Component initialization order in polymer 2
We are migrating a medium sized app from polymer 1 to polymer 3. Thus far we are stuck in the intermediate step of getting our hybrid components to work.
We are encounting some difficulties regarding ...
1
vote
1
answer
188
views
::part() in polymer is not compatible with Microsoft-Edge
I am developing a web-component project based on polymer 2.0.
I am using the part concept in polymer to differentiate different aspect of an element. Since I need different style to a specific part, ...
3
votes
1
answer
440
views
Disable entire month in vaadin date picker
I am trying to disable all dates of all months in vaadin-date-picker. While looking through the code,
I found that I can individually disable dates by setting disabled in vaadin-month-calendar.html#...
0
votes
1
answer
349
views
How to Push Objects into Array - Polymer 2.x
I am trying to push items to an array in Polymer. this.request is in a dom-repeat template and it displays correctly in the DOM. However, when I log this.request it shows that the last entry overwrote ...
0
votes
1
answer
422
views
In Polymer 3, double click event is not working. ex: @on-dblclick="${this.dblclicked}"
How to use double click event in polymer 3 I don't want to use custom double tap.
Below is my code which is not working.
import { html } from '@polymer/lit-element';
import { PageViewElement } from '...
0
votes
1
answer
443
views
How to Properly Authenticate Google Vision API Using Polymer
I am trying to run a test on the Google Cloud Vision API to see how it fares to the client side Shape Detection API.
I am hoping to POST JSON with a base64 encoded image and get image text and ...