polymer

bind a polymer template to html5 video.textTracks

拥有回忆 提交于 2019-12-11 11:07:03
问题 I try to create a html5 video timeline where all the tracks and the cues are displayed using polymer. this is the code I have so far, but the binding does not work. It always displays a length of 0: <polymer-element name="video-timeline"> <template> <video id="testVideo" src="./path/to/video.webm" width="300" controls="controls"></video> <button on-click="{{addTrack}}">Add Track</button> <template bind="{{$.testVideo.textTracks}}"> <p>Item count: {{length}}</p> <ul> <template repeat> <li>{

Trigger an event when one of a set of Polymer paper-toggle-buttons is pushed

寵の児 提交于 2019-12-11 10:16:40
问题 I have a set of Polymer paper-toggle-buttons that make elements in a graph (using c3) appear and disappear. I've had some success picking up the event change with the following code: HTML: <div class="graph-sets-element"> <core-label horizontal layout> <paper-toggle-button checked id="graph1"></paper-toggle-button> <h4>Graph 1</h4> </core-label> </div> <div class="graph-sets-element"> <core-label horizontal layout> <paper-toggle-button checked id="graph2"></paper-toggle-button> <h4>Graph 2<

Appropriate use of metadata in polymer application (i.e. core-meta element)

依然范特西╮ 提交于 2019-12-11 10:14:50
问题 I'm confused as to the proper use of core-meta in polymer. I tried looking at Topeka's metadata.html but it seems to cloud the issue for me further, with its extensive usage of x-meta tags seemingly related specifically to polymer designer tool etc. (I'm not using polymer designer) Basically, I'm simply looking to create a config-file of sorts for my polymer application. For instance, I'd like to set the application's API data source URL (or at least the base URL) in one place and have any of

“404 (Not Found)” for “polymer.min.js”

僤鯓⒐⒋嵵緔 提交于 2019-12-11 09:49:47
问题 I still got the same error as described here: "Uncaught Reference Error: Polymer is not defined" caused by IP-change? But after I uninstalled and reinstalled yeoman, grunt, bower and polymer-generator, fresh initialized Polymer-projects work fine now. My old Polymer-projects still have the same Error. I am using the newest versions for all tools mentioned above. (Grunt: 0.4.5, Bower: 1.3.9) 回答1: After all it seems like the problem was somehow caused by Polymer. I switched to the newest

Applying styles to elements inserted with InnerHTML in Polymer

流过昼夜 提交于 2019-12-11 09:17:11
问题 I have some element that contains content of element in it and I want to format it and the only way that worked is changing InnerHTML. However, local stylesheet doesn't apply to changed content. How to fix that? Here's the part of the code of a custom element created with Polymer: Polymer({ attached: function() { this.querySelector(".post-body").innerHTML = this.format(this.querySelector(".post-body").innerHTML); }, format: function(text) { return text.replace(/\n(.+)\n/g, "<p>$1</p>"); }, })

Resize <paper-dialog> when selecting <paper-tab> inside the dialog

旧时模样 提交于 2019-12-11 08:58:14
问题 resizeable_dialog.html <link rel="import" href="../../packages/polymer/polymer.html"> <link rel="import" href="../../packages/paper_elements/paper_dialog.html"> <link rel="import" href="../../packages/paper_elements/paper_button.html"> <link rel="import" href="../../packages/paper_elements/paper_tabs.html"> <link rel="import" href="../../packages/paper_elements/paper_tab.html"> <link rel="import" href="../../packages/paper_elements/paper_icon_button.html"> <link rel="import" href="../..

polymer /deep/ selector is not working in mobile devices

若如初见. 提交于 2019-12-11 08:38:12
问题 I trying to rearrange layouts when device screen is resized, so i do this: if(screenOrientation == SCREEN_ORIENTATION_LANDSCAPE) { document.querySelector("html /deep/ [landscape-horizontal]").removeAttribute('vertical'); document.querySelector("html /deep/ [landscape-horizontal]").setAttribute('horizontal', ''); } This is working in the desktop machine correctly, but in mobile (both android phone, tablet and iOS simulator) i got this error: "Uncaught SyntaxError: Failed to execute

Preventing the contents of draggable polymer elements from being selectable

一曲冷凌霜 提交于 2019-12-11 08:16:57
问题 I have a polymer element defined as follows <polymer-element name="draggable-list-item" > <template> <core-style ref="draggable-list-item"></core-style> <div id="row-container" draggable="true"> <content></content> </div> </template> <script type="application/dart" src="draggable_list_item.dart"></script> </polymer-element> I know that for normal elements (non polymer / web component) that I need to add a style like [draggable] { -moz-user-select: none; -khtml-user-select: none; -webkit-user

Polymer 2.0 app crashes Internet Explorer 11

我的未来我决定 提交于 2019-12-11 07:59:22
问题 I have a polymer 2.0 app that is transpiled to ES5. It works well in Edge, Firefox, and Chrome; however, when I open it in Internet Explorer 11 on Windows 7, 8.1, or 10, the program crashes. Sometimes it will render without most of the styles, other times it will crash before the page is even rendered. Once, it said that a script was running long and asked if I wanted to stop the script. Doing this also crashed IE. Since the developer tools won't open, I'm not able to debug this. What

href to another element does not work in Polymer

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-11 07:34:55
问题 I created a project using the Polymer Starter Kit, with its app-router. My my-app.html has the selectors for the views like so.. <iron-pages role="main" selected="[[page]]" attr-for-selected="name"> <my-view1 name="view1"></my-view1> <my-view2 name="view2"></my-view2> <my-view3 name="view3"></my-view3> <my-view4 name="view4"></my-view4> <my-view5 name="view5"></my-view5> <my-view6 name="view6"></my-view6> </iron-pages> I have a component my-view1.html, within which I have div with href tag