Questions tagged [polymer]

The Polymer library offers an array of functionalities that streamline the process of creating personalized elements, enabling them to function seamlessly akin to regular DOM elements in a swift and hassle-free manner.

Revamping a polymer component by incorporating information fetched from API endpoint

For one of my projects, I am facing an issue while updating a property in a polymer element with data from an ajax api call. Oddly enough, I have successfully implemented a similar feature elsewhere in the application where users can dynamically add packag ...

Combine iron-page and bind them together

Recently, I've started learning about Polymer and I want to bind together paper-tabs and iron-pages so that when a tab is clicked, the content loads dynamically. After going through the documentation, this is what I have tried: <app-toolbar> ...

What happens when Google Polymer platform is used without defining _polyfilled?

My attempt at creating a simple example using Google Polymer's platform.js is running into an error message that says: Uncaught TypeError: Cannot read property '_polyfilled' of undefined This is what I'm attempting to achieve: <current-date></cu ...

Issue: Module 'browser-sync' not found

Whenever I attempt to run gulp serve, an error is thrown. module.js:338 throw err; ^ Error: Cannot find module 'browser-sync' at Function.Module._resolveFilename (module.js:336:15) at Function.Module._load (module.js:278:25) ...

refresh polymer components or make an ajax request within a custom element

I've been spending days on this issue with no success! My application relies on cookies for session handling and includes multiple custom elements imported in the header. Some of these elements need to access information from the 'cookie session' to make a ...

Upgrade to the most recent version of Polymer and npm

It seems like this question is more related to npm rather than Polymer. I have been working on a substantial Polymer project, currently at version 1.3.0 as indicated in the bower.json file within the Polymer directory. After being away from the project fo ...

Error 1: npm issue found with Polymer CLI

Every time I attempt to install the polymer CLI, I encounter this error. It keeps popping up no matter how many times I try to install it. sudo npm install --unsafe-perm -g polymer-cli Password: npm WARN deprecated <a href="/cdn-cgi/l/email-protection" ...

Having Trouble Installing Polymer on Arch Linux with npm

Encountering an error during the installation of Polymer CLI with the command below: sudo npm install -g polymer-cli 29577 info lifecycle <a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="b0c7d4f0819e859e80">[email prot ...

Having trouble incorporating custom elements with the document.execCommand function

I have been attempting to insert a custom element into an editable div using the document.execCommand method as described in detail on https://developer.mozilla.org/en-US/docs/Web/API/Document/execCommand. However, when I try to add a custom polymer eleme ...

Try incorporating a variety of colors to enhance the appearance of your paper-menu in Polymer 1

I'm currently working on creating a customized menu using Polymer 1.0. This is how my menu structure looks like: <paper-menu> <template is="dom-repeat" items="{{menu}}" as="item"> <paper-item> <div>{{item.title}}</div& ...

Attempting to utilize a custom element, the message "You attempted to use polymer without loading it first" confirms that it has indeed been imported

I've been experimenting with a custom element for a paper-dialog popup that I want to incorporate. Surprisingly, when I create a test page within the same file where the custom element is defined, using all the identical imports as my main index, it works ...

Modify the hue of the iron-icon upon being tapped

There's a simple example I have where my goal is to modify the color of an iron-icon when it's tapped. To achieve this, I'm utilizing iron-selector for tapping: <template> <style> :host { display: block; padding: 10px; --iron- ...

Interacting with shadow DOM elements using Selenium's JavaScriptExecutor in Polymer applications

Having trouble accessing the 'shop now' button in the Men's Outerwear section of the website with the given code on Chrome Browser (V51)'s JavaScript console: document.querySelector('shop-app').shadowRoot.querySelector ...

Getting JSON object string in Node.js using Express

I am currently utilizing Polymer's <iron-ajax> to send data, in the form of a JSON string created using JSON.stringify, to a Node Express server. However, upon receiving the data, it appears in a strange format that I am unable to parse. Specifically ...

Data modifications in polymer are not being accurately displayed

I need help with hiding/unhiding a UI element using a button in Polymer. Despite having the necessary elements and code set up, it is not working as expected: <button id="runPredictionButton"> <i>Button text</i> </button> <p ...

What is the process for creating custom event bindings in AngularJS?

There is a custom event called core-transitionend (specifically triggered by Polymer), and I am able to specify an event handler using document.addEventListener(). However, what would be the most recommended approach for achieving this in AngularJS? Alter ...

Exploring cross-site session management using a NodeJS/Passport/Express backend integrated with a Polymer frontend

Currently, I have a node/express/passport backend running on port 3001 that I am accessing directly from the browser for authentication purposes. It successfully authenticates and manages access to protected URLs. The frontend is built using Polymer and is ...

Remove HTML element and launch in a separate browser tab while preserving styles

I am currently working on developing a single-page application with Polymer3 (Javascript ES6 with imports). One of the key functionalities of my application involves moving widgets to new browser windows, allowing users to spread them across multiple scree ...

Tips for adjusting the size of a drawing on an HTML 5 canvas within a personalized Polymer component

In my custom Polymer element, I am looking to dynamically resize an html5 canvas when the window resize event occurs. Despite trying to utilize the window.onresize event, I encountered difficulties with accessing canvas functions. One of the functionalit ...

The compatibility between Polymer JS and Rails Turbolinks is problematic

Currently, I am facing a challenge in integrating PolymerJs with a Ruby on Rails project that has Turbolinks enabled. The issue arises when I click on a link - the new page loads correctly but my Polymer components do not reinitialize. They appear as if no ...

Can you please explain how to indicate a modification in a JSON object with Polymer, transferring information from Javascript, and subsequently displaying child elements?

Currently, I am creating a JSON file that contains a random assortment of X's and O's. My goal is to display these elements in a grid format using a custom Polymer element. Initially, everything works fine as I can see a new grid generated each t ...

A Step-by-Step Guide to Launching PDF Blob from AJAX Response in a Fresh Chrome Tab

I'm sending a POST request to a server, and in response, I receive a PDF file that is returned as a blob. To handle this blob, I am using the "handle-as='blob'" attribute of iron-ajax (a Polymer element), just to cover all bases. Now, my goal is to displ ...

Combining Python Bottle with Polymer Paper Elements

My website currently has a variety of forms where users input information, which is then used to calculate and display new content using Javascript. I rely on Python Bottle for user registration, form auto-filling from the backend and database management. ...

Issue with chromedriver locating element on Polymer site

I am currently working on an automation project using Selenium, which involves calling the Chrome webdriver to run test cases. However, I have encountered an issue with Chromedriver not being able to locate elements on websites built with the Polymer frame ...

When the browser requests "element.html," a compiled jade file is served using Express

Within my layout.jade, I have included link imports for regular HTML Polymer elements like this: link(rel="import" href="/bower_components/paper-tabs/paper-tabs.html") After coming across this gist, I decided to write my Polymer elements in jade. However ...

The CSRF token is being rejected by the Drupal services/cors API

Currently, I am utilizing polymer to facilitate ajax requests to my Drupal services api. After sending a POST request to login and receiving a token in return, I proceed to send another POST request to create a node. Despite successfully passing the token ...

Exploring the Safari browser with Polymer 2.0

Looking for some help with a question I have... I've been experimenting with the new Polymer 2.0 preview on Safari, but it doesn't seem to be working correctly. I'm using a simple code (just my-element) in the index.htm file, loading the polyfill without b ...

Has anyone attempted to integrate AngularJS with Polymer's paper-dropdown-menu component?

Can I integrate this Polymer dropdown menu demo with AngularJS? https://www.polymer-project.org/components/paper-elements/demo.html#paper-dropdown-menu I've made attempts, but it's not working for me... <paper-dropdown-menu label="Categories"& ...

Polymer elements fail to adapt to varying screen sizes

I am currently working on creating a responsive website using polymer, but I have encountered an issue where certain elements (such as core-toolbar and paper-fab) are not scaling properly on smaller, denser screens like smartphones. After browsing through ...

(generator-polymer) Polymer generator is unsuccessful as it is unable to locate the 'find-index' module

After entering yo polymer in a new directory, the following error message is displayed. module.js:338 throw err; ^ Error: Cannot find module 'find-index' at Function.Module._resolveFilename (module.js:336:15) at Function.Mo ...

Inserting HTML code into the polymer

This is my HTML code: <div id="setImgWrap"> <!-- The appended image will be displayed here --> </div> Here I am appending an image from JavaScript: this.addedImages = { imageURL:self.downloadURL }; this.$.setImgWrap.append('<ir ...