polymer - How do I register the on-tap in a paper-icon-button in an ag-grid cell renderer?

I am working on adding ajax call to paper-icon-buttons that are rendered in an ag-grid cell renderer. Here is the script in my custom polymer component. The paper-icon-buttons do show up and clicking on them causes the ripple, but the functions in the on-tap are not being called.Is there a better way to add the paper-icon-button entries to the cell? How can I add the registration of the on-tap properly?Thank you!<script> function sourceRenderer(params) { if (params.value) return '<span><a href="/harvest/' + params.dat...Read more

How to set the responsive width of Polymer component inside `<iron-list grid>`

Consider the following code, where <my-item> always has a fixed width of 200px inside <iron-list grid><!DOCTYPE html><html><head> <meta charset="utf-8"> <title>Polymer Element Test Case</title> <!-- Load webcomponents-loader.js to check and load any polyfills your browser needs --> <script src="bower_components/webcomponentsjs/webcomponents-loader.js"></script> <link rel="import" href="bower_components/polymer/polymer-element.html"> <link rel="import" href="bower_c...Read more

Is it possible to share mixins across web components (and imports) in Polymer?

As a follow up to How to extend multiple elements with Polymer and Polymer multiple inheritence/composition, based on their answers, I wonder if it's possible to share mixins across multiple web components (and multiple imports) to reuse functionality.Mixins seem to be the only way to share functionality across multiple custom elements. However, it seems like you can only use a mixin within one import. Which means, if you have a mixin, that gives a web component a specific functionality (let's say draggable), it's not possible to mix it into t...Read more

is polymer/observe-js part of polymer.js or an add-in for additional functionality

Assuming you are using Chrome latest with native support for Web Components then all we need for the additional sugar is polymer.js or import polymer.html. 1) Is the observe-js part of polymer.js2) Does observe-js add additional functionality that is not included in polymer.js beyond just the pollyfill part. From the observe-js docs it says it adds PathObserver, ArrayObserver, ObjectObserver, CompoundObserver, ObserverTransform functionality. The Polymer API docs have the observe properties,changed watchers, and observe-blocks. 3)What's the ...Read more

polymer - Upgrading from platform.js to webcomponents.js issue

I have just updated my polymer project ( bower update ) to switch to the new webcomponents.js library.However I get a:"Uncaught TypeError: undefined is not a function" on polymer.js:12This is my index.html page:<!doctype html><html class="no-js"><head> <meta charset="utf-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <title>Nautes Dashboard</title> <meta name="description" content=""> <meta name="viewport" content="width=device-width, initial-scale=1"> <!-- Pl...Read more

Polymer 1.0 - Where is the old core list?

One of the issues I'm having with the new polymer release is identifying which components are replacing the old ones. In the case of the old componente core-list, I cannot find the equivalent for the new release. Does anyone know which element replace core-list?...Read more

Polymer 1.x: Using Font Awesome with paper-icon-button

Is there a way to use an icon from the Font Awesome library as the icon inside a paper-icon-button?Here is my jsBin.http://jsbin.com/rahesepeho/2/edit?html,output<!doctype html><head> <meta name="description" content="iron-data-table beta3"> <meta charset="utf-8"> <base href="https://polygit.org/components/"> <script src="webcomponentsjs/webcomponents-lite.min.js"></script> <link href="polymer/polymer.html" rel="import"> <link href="paper-icon-button/paper-icon-button.html" rel="import"&g...Read more

polymer - cannot find paper-button.html

I'm new with Polymer. Doing this tutorial: https://auth0.com/blog/build-your-first-app-with-polymer-and-web-components/My problem is my project cannot find the file I did installed it with bower:bower install PolymerElements/paper-button --saveAnd the directory is created, but there is no .html file in it.So when I try to include it in my component<link rel="import" href="../bower_components/paper-button/paper-button.html">I get a 404...Read more

How to test service files using wct in polymer if it doesn't contain any custom component

I would like to write unit test case for a service file named session.js, where there is no custom element is defined. Can we call functions defined in service file from Polymer WCT.export const ValidateSession=()=>{ try{ return (logindate <= session); } catch(e){ console.log(e.message); } }In my service file, function is defined like above. How to write unit test case to check above function is being called or not....Read more

polymer - importHref on edge/safari resulting in 'A custom element with name 'dom-bind' has already been defined

I've been having issues with errors on importHref in Polymer (polymer-2) in edge and safari , On the initial load I get a whole series of errors like.. SCRIPT5022: A custom element with name 'dom-bind' has already been defined. webcomponents-lite.js (168,225) SCRIPT5022: A custom element with name 'dom-repeat' has already been defined. webcomponents-lite.js (168,225) SCRIPT5022: A custom element with name 'dom-if' has already been defined. webcomponents-lite.js (168,225) SCRIPT5022: A custom element with name 'array-selector' has a...Read more

polymer serve vs. static web server

What kind of magic is polymer-serve doing that I don't get with a simple, static web server?I just started with a simple "hello world" project. When I run polymer serve I'm able to browse to the page at http://localhost:8000/example.html and it works great. If I use static-server and browse to the same page, I get an error message in Chrome. Uncaught TypeError: Failed to resolve module specifier "@polymer/lit-element". Relative references must start with either "/", "./", or "../".Here's example.html, which was copied right out of the README.&...Read more

Polymer 3 without Polymer CLI

I'm trying Polymer 3, and i'm asking a question.Is it possible to try it (or to build a complete app) without using Polymer CLI?After searching, I think that it's not really possible because of using package names in my imports.As the documentation say :"Using package names in your imports makes it easier to install third-party dependencies, and removes the need to juggle the different path styles of elements and applications. Previously, for example, you had to import the Polymer library from ./node_modules/@polymer/polymer/polymer-element.js ...Read more

Polymer bundler does not output node_modules folder with custom bundles

Using polymer-cli 1.7.7, bundling a Polymer 3 app for esm, es6 and es5 support does not output node_modules. As a consequence, dependencies such as @webcomponents/webcomponentsjs are not found when the bundles are served with prpl-server.Here is a small example for reproduction:https://github.com/lpellegr/polymer-bundler-bundle-issueThis example is based on the original polymer 3 app template generated by polymer-cli init. The configuration file polymer.json has been edited to generate esm, es6 and es5 bundles as suggested on the following reso...Read more