polymer

Value is not a sequence Safari exception

六眼飞鱼酱① 提交于 2019-12-04 00:17:58
I'm getting this error on any console.log statement in my codebase. This affects only Safari 11.0 (12604.1.38.1.7) on Mac 10.16.6 How can i resolve this and how this happened? Jonathan Cole You need to disable the "WebDriver" extension. I had this same problem, and my stack trace included a resource called "Script element" which was making this call: b.initMessageEvent("safaridriver.message", !1, !1, a, window.location.origin, "0", window, null); Maybe there's a SafariDriver update out there that also fixes this? The main answer here, led me down the wrong path. Some notes: My console.log

Changing Polymer paper elements default font

青春壹個敷衍的年華 提交于 2019-12-03 23:35:34
What is the best way to change Polymer Paper Elements default font from Roboto to a custom font? I used the --paper-font-common-base: {} mixin to define my font and this works in most places... but not all. In places like the paper-toolbar for example there is still Roboto applied. Is there another way to do this? EDIT I see the offender now. Inside paper-styles/typography.html there are loads of mixins that specifically define the font... eg --paper-font-title: { /* @apply(--paper-font-common-base) */ font-family: 'Roboto', 'Noto', sans-serif; -webkit-font-smoothing: antialiased; /* @apply(-

When to use on-click or on-tap w/ Polymer?

只愿长相守 提交于 2019-12-03 23:33:40
问题 I've researched a lot but still haven't found a good answer. When should I use on-click and when on-tap , specifically w/ Polymer? This guide focuses on programmatic event listeners, so isn't helpful in that regard: https://www.polymer-project.org/docs/polymer/touch.html 回答1: Use on-tap all the time, because the semantics of on-tap are better aligned with mobile devices than on-click . For example, on-click does not fire if another finger is touching the screen, or if the element directly

polymer dart input binding int properties

家住魔仙堡 提交于 2019-12-03 23:15:32
问题 What is the proper way of binding an input field to an int property on an object (e.g. input box changes and updates int property of an object causing another element who is binding to the same property to update) Example code is below; I may be thinking the wrong way going this route but need some clarification. <!-- index.html --> <!DOCTYPE html> <html> <head> <link rel="import" href="components/calc.html"> <script type="application/dart">export 'package:polymer/init.dart';</script> <script

Using external JS libraries in a web component

浪子不回头ぞ 提交于 2019-12-03 23:13:52
I am developing a web component using Polymer 2, and would like to make use of a third-party JavaScript library, which was not specifically designed for use with web components. As far as I know, the only way to do this is to include a <script> tag referencing the library, within the HTML file of my web component. I can see a couple of issues with doing this, and want to know if there are any ways around them, and indeed whether including third-party libraries in this way is considered bad-practice. The external library might set global variables which are visible to other components on the

Polymer Chip-to-Card Pattern with core-animated-pages and a Long List

♀尐吖头ヾ 提交于 2019-12-03 23:12:21
Generally I'm finding it difficult to use the core-animated-pages Polymer element to implement a chip list to card type pattern when I have a very long list that scrolls the page. I think the difficulty is that once the transition has finished, the hidden portion is taken out of the layout and I'm having a hard time figuring out a way around this. Easy Illustration JSFiddle: http://jsfiddle.net/hmknv3jh/ On the output, scroll to the bottom and click a chip, the problem should be obvious. Details Make sure you have to scroll to get to a chip toward the bottom and click one. The chip flies off

Using Firebase Authentication with Google App Engine

寵の児 提交于 2019-12-03 22:31:11
问题 I'm a newbie so any help appreciated. I've created an app/service using Google App Engine (node) that returns a simple 'hello world' response, see https://resumetemplatesconverter.appspot.com/ I've also got a Polymer web app that uses Firebase Authentication for sign up, sign in, sign out, etc. Question is, what is the best way to configure the Google App Engine app/service so that only users authenticated with the Polymer web app can use it? Thanks. 回答1: Firebase (Authorization Server) sends

Create Anchor Element in polymer

雨燕双飞 提交于 2019-12-03 22:02:14
Is it possible to create an element that will be used as an anchor in polymer. So for example <template repeat="{{ content in contentitems }}"> <div id="{{ content.id }}">{{content.stuff}}</div> </template> Would it be possible to create a hyperlink to the content#id anchor like http://example.com/#someid Alternatively, we can query that element with querySelector like the below and then scroll it into view if necessary with JavaScript. I'd rather not have to use a JS router however for anchor hyperlinking? scrollIntoViewFunc(document.querySelector("html /deep/ #someid")) Here's an actual URL

How to set baseUrl in Polymer Starter Kit?

ε祈祈猫儿з 提交于 2019-12-03 21:33:27
How to set baseUrl in Polymer Starter Kit(light version)? (similar: Serving Polymer App to a /path not at root ) I want to run it in subfolder (dl and unzipped PSK there, server is xampp): http://localhost/test/psk/app/ When I go to that URL, app is redirecting to: http://localhost/ with this note: Can't find: http://localhost/test/psk/app/#!/test/psk/app/ . Redirected you to Home Page Ok There are no console errors, app work fine except the URL problem. Here are app.js : // Sets app default base URL app.baseUrl = '/'; if (window.location.port === '') { // if production // Uncomment app

How to solve No 'Access-Control-Allow-Origin' in polymer-project?

我们两清 提交于 2019-12-03 20:40:45
问题 Now I exploring Polymer-project 1.0 and the task is to get the JSON and print output repeatedly. But no matter what i tried below error is coming, even i tried with Github pages also gives me same error response in terminal Error XMLHttpRequest cannot load https://ajax.googleapis.com/ajax/services/search/news?v=1.0&rsz=8&pz=1&cf=all&ned=in&hl=en&topic=tc. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://rajasimon.github.io' is therefore not allowed