polymer

Polymer web app element null pointer exception

ぐ巨炮叔叔 提交于 2019-12-20 06:01:22
问题 I am user iron-list with iron-ajax but after ajax response when pushing element to iron-list giving null exception = "Cannot read property '_list' of undefined" <script> Polymer({ is: 'my-home', ready: function () { this.$._ajax.generateRequest(); }, onResponse: function (e) { var people = e.detail.response.data; people.forEach(function (person) { this.$._list.push('items', person); }); // Clear the lower threshold so we can load more data when the user scrolls down again. this.

Polymer 2.0 access a parent component from child component

。_饼干妹妹 提交于 2019-12-20 05:37:54
问题 I have a nested component, what is the Polymer way to travel up the DOM or component tree in this case. <parent-component> <some-component> <component-i-am-starting-from></<component-i-am-starting-from> </some-component> <some-other-component> </some-other-component> </parent-component> I'd like to be at a deep nested component and reference any of the parent components and their models or trigger an event inside one of them. Bonus if I can access sibling components, etc. Traveling down was

Polymer 1.0 paper-drawer-panel toggle is not working

南笙酒味 提交于 2019-12-20 05:37:08
问题 'my-layout' code : <link rel="import" href="../bower_components/iron-icons/iron-icons.html" > <link rel="import" href="../bower_components/paper-icon-button/paper-icon-button.html" > <link rel="import" href="../bower_components/paper-drawer-panel/paper-drawer-panel.html" > <link rel="import" href="../bower_components/paper-header-panel/paper-header-panel.html" > <link rel="import" href="../bower_components/paper-toolbar/paper-toolbar.html" > <polymer-element name="m-layout" > <template>

Firebase Security Rules Block Writing to Firebase

心不动则不痛 提交于 2019-12-20 04:15:59
问题 Note: This question is tagged polymer because the Polymer library is used to generate the Javascript. This question is about two different but related problems dealing with Firebase security. Problem 1 and Problem 2 seem to suggest opposite realities and opposite results when trying to get the Firebase security rules to work. (FWIW: Here is my prior unsuccessful attempt to write this question.) Here is the live code in a JSBin. http://jsbin.com/hinehoyigo/edit?html,output Problem 1 Firebase

polymer error on reloading

本小妞迷上赌 提交于 2019-12-20 04:06:24
问题 i have installed the polymer starter kit and once i load the starter kit every thing gets loaded properly and the url looks like http://127.0.0.1:8887/ then once i click on any view that page gets open and url changes to http://127.0.0.1:8887/view1 but if i reload the browser now, instead of showing the same page it displays the entry not found error.i have tried searching over internet for solution but i didn't find one.what should i do to fix it. 回答1: When you refresh the page (http://127.0

Polymer select2 element

£可爱£侵袭症+ 提交于 2019-12-20 02:54:53
问题 I am attempting to wrap the great select2 jquery widget (https://github.com/ivaynberg/select2) in a Polymer element for easy reuse. I was able to get the select initialized correctly, but am running into issues after initialization. Specifically, when clicking the select to open it a type error is thrown in the select2 script when positioning the pop over. Here is a repo with the failing implementation: https://github.com/ivelander/x-select2 Has anyone had good success integrating Polymer

Polymer in Chrome Extension content script

孤人 提交于 2019-12-20 02:44:08
问题 I'm trying to use Polymer in a chrome extension. The overall goal is to leverage styling encapsulation so my content scripts run isolated from the CSS of the page being visited. Beginning with a custom element in my-element.html I'm using Vulcanize like so: vulcanize -o build.html my-element.html If I try something like this in my content script: // content_script.js $.get(chrome.extension.getURL('build.html'), function(data) { var html = document.createElement('div'); html.innerHTML = data;

cannot get height 100% to work in polymer elements

一曲冷凌霜 提交于 2019-12-20 02:31:06
问题 I'm trying to use this technique CSS 100% height layout to fill page height 100% Ultimately it fails because DOM has custom tags that won't honor height tag Example: Works <div style="height:100%"> ok here <div style="height:100%"> <!-- WORKS: takes full browser height --> </div> </div> Broken <div style="height:100%"> ok here <my-tag style="height:100%"> <!-- BROKEN : takes minimal browser height --> </my-tag> </div> I tried using <polymer-element name="my-tag" extends="div"> but then page

Polymer keypress event handler not being called

我的未来我决定 提交于 2019-12-20 02:19:06
问题 Can't figure out why in the following polymer I am unable to get the keypressHandler function to be called. What am I doing wrong? (I tried putting the on-keypress attribute on the span element itself, but still no cigar.) The rest of the functionality works as expected. <link rel="import" href="../bower_components/polymer/polymer.html"> <polymer-element name="psq-posscell" attributes="isposs nVal" on-tap="{{toggle}}" on-keypress="{{keypressHandler}}" > <template> <link rel="stylesheet" href=

Polymer 1.0 on firefox ReferenceError: Polymer is not defined

心已入冬 提交于 2019-12-20 02:18:06
问题 Hello I have a working Polymer 1.0 web page on Chrome and Opera. Now I need the page to run in Firefox and Safari. I have the following test: <!DOCTYPE html> <html> <head> <?php use Cake\Routing\Router; ?> <?php echo $this->Html->script('/bower_components/webcomponentsjs/webcomponents-lite.min.js'); ?> <link rel="import" href="<?= Router::url('/'); ?>bower_components/polymer/polymer.html"> <dom-module id="test-element"> <template > <h1>It works</h1> </template> <script> Polymer({ is: "test