polymer

Retrieve data from Firebase to Polymer element

ぐ巨炮叔叔 提交于 2019-12-13 07:01:05
问题 I'm having trouble getting data from firebase to an polymer element. Here is my code: <dom-module id="bb-account-settings"> <template> <style is="custom-style" include="shared-styles"></style> <div class="settings-dialog"> <div class="frame"> <div class="horizontal layout"> <div> <div class="user-image"></div> </div> <div class="horizontal layout"> <paper-input label="First Name" value="{{fNameSet}}"></paper-input> &nbsp&nbsp&nbsp&nbsp&nbsp&nbsp <paper-input label="Last Name" value="{

Searching tags across nested scopes involving insertion points

霸气de小男生 提交于 2019-12-13 07:00:48
问题 Context: I keep carrying out tests about web component composition in different contexts. Please refer to Accessing the parent context of a web component being either DOM or Shadow DOM for details. In this case, I am including in my tests insertion points within the searching space. Problem: Let's suppose we have several instances of <x-target> element that we are trying to find. Points from whence those <x-target> are intended to be located will be <x-searcher> elements. The searching

Getting access to a Polymer method inside a function

点点圈 提交于 2019-12-13 06:25:02
问题 I use the Polymer Google Map element and I've faced with a problem while adding an event listener to the map. * blah blah blah * ready: function () { this.map.addEventListener('google-map-rightclick', this._rightClickOnMap); }, test: function () { console.log(1); }, _rightClickOnMap: function (event) { this.test(); } * blah blah blah * I've tried to bind this to the listener but JS throw me the error this.map.addEventListener('google-map-rightclick', this._rightClickOnMap).bind(this); 回答1:

Can't find element on iron ajax event methods

社会主义新天地 提交于 2019-12-13 05:55:51
问题 For below given code this.$.createButton or document.querySelector('createButton') works inside the ready method. But same code fails inside handleRequestSent or handleResponseReceived . The error message I get is Uncaught TypeError: Cannot read property 'createButton' of undefined I tried to debug, it appears that inside handleRequestSent and handleResponseReceived the this actually pointing to iron-ajax, but not the element dom root. Any suggestion is welcome. Thanks in advance. <dom-module

Polymer 1.0: I need an example of a login button

*爱你&永不变心* 提交于 2019-12-13 05:52:51
问题 Question Does anyone have a working example of code for a login button? Detail : I need it to be a <paper-button> that says, "Login with x." Where "x" is any one of the following: "Google", "Google Plus", "Facebook", "Linked In", "Yahoo", or "Twitter". Obviously, the button also needs to "point to" or integrate with the respective service it mentions. Also please note, <google-signin> described here doesn't work for me because I need to use my own button (for styling purposes). I don't want

How to import template in polymer?

纵饮孤独 提交于 2019-12-13 05:19:21
问题 I want create template libraray in isolated file. ./my-components/templates.html <template id="overTemplate"> <div on-mouseover="{{mouseOverHandler}}">OVER</div> </template> ..... And connect this file in my polymer-element: <link rel="import" href="./my-components/templates.html"> Then use this template: <template bind ref="overTemplate"></template> How to do it? 回答1: How about? var link = document.querySelector('link[rel=import]'); var content = link.import.querySelector('#overTemplate');

Polymer 1.0: What could be causing this error? “Uncaught TypeError: this is not a function”

你。 提交于 2019-12-13 04:58:51
问题 Question What could be causing the following console error? Uncaught TypeError: this.$.authgoogle.signin is not a function Goals I am trying to implement a user authentication in my custom element. I am using Google's authentication services to handle the authentication. For styling purposes, I am using my own custom <paper-button> instead of the button that comes with, say, the <google-signin> element. I am using the <google-signin-aware> element to do the authentication. Here is the

How do you observe the width of an element in polymer?

北慕城南 提交于 2019-12-13 04:48:46
问题 I was wondering how it is possible to observe changes to an element's css property such as the width. I tried doing this but it didn't work. Where did I go wrong? Is it possible? <polymer-element name="test-resize" attributes="elementWidth"> <template> <p>elementWidth : {{elementWidth}}</p> </template> <script> Polymer({ elementWidth: 100, observe: { "clientWidth" : "updateWidth", }, updateWidth: function(oldValue, newValue){ this.elementWidth = newValue; } }); </script> </polymer-element> In

Understanding Polymer 1.x Polymer Starter Kit file structure as it relates to bower_components imports

假如想象 提交于 2019-12-13 04:00:39
问题 In the Polymer Starter Kit, every reference to the bower_components subdirectory refers to a node just below the app directory. However, (at least in my version of PSK) the bower_components subdirectory is one level up from the app directory. In other words, the bower_components subdirectory is actually located in the project root directory. Am I just miscounting my directory nodes? Or does this have something to do with how gulp and maybe vulcanize work? Or is it something else altogether

timelinechart couldn't decode Array as JSON:

好久不见. 提交于 2019-12-13 03:56:11
问题 I'm getting the issue "couldn't decode Array as JSON: " for the below chart. Rest of the charts seem to work with this format but not this one. <google-chart type='timeline' options='{"title": "Timeline", "legend" : {"position" : "bottom", "alignment": "start"} }' cols='[{"label":"Question", "type":"string"}, {"label":"Number", "type":"string"}, {"label":"Start", "type":"date"}, {"label":"End", "type":"date"} ]' rows='[["Question1", "1", new Date(0,0,0,12,0,0), new Date(0,0,0,12,30,0)], [