This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <meta charset="utf-8"> | |
| <title>JS Bin</title> | |
| <link rel="import" href="https://cdn.rawgit.com/Polymer/polymer/v0.9.1/polymer.html"> | |
| </head> | |
| <body> | |
| <rtc-peer-connection is-caller allow-data-channels auto-connect log> | |
| <rtc-signal-channel url="wss://example.com"></rtc-signal-channel> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Base behavior ("super class"): | |
| var BehaviorFoo = { | |
| baz: function() { | |
| console.log('foo'); | |
| } | |
| }; | |
| // Inheriting behavior ("sub class"): | |
| var BehaviorFooBar = { | |
| baz: function() { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Example: | |
| // < Flatten([1, 2, 3, [4, 5, [6]], [7, 8, 9], 10) | |
| // > [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]; | |
| function Flatten() { | |
| var args = Array.prototype.slice.call(arguments); | |
| var list = []; | |
| var arg; | |
| while (args.length) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <script> | |
| document.addEventListener('DOMContentLoaded', function() { | |
| var template = document.createElement('template'); | |
| template.innerHTML = RawDocument.textContent; | |
| // Do what you will w/ document here.. | |
| template.content.querySelector('title').textContent = 'Bar'; | |
| template.content.querySelector('p').textContent = 'Foo'; | |
| template.content.querySelector('script').textContent = 'console.log("This document is owned.");'; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Verifying I am +cdata on my passcard. https://onename.com/cdata |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <link rel="import" href="https://rawgit.com/Polymer/polymer/v0.9.0-rc.1/polymer.html"> | |
| <style is="custom-style"> | |
| * { | |
| --test: { | |
| background: red; | |
| } | |
| } | |
| </style> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <link rel="import" href="../bower_components/polymer/polymer.html"> | |
| <link rel="import" href="../bower_components/iron-ajax/iron-ajax.html"> | |
| <dom-module id="kite-map" attributes="foo"> | |
| <template> | |
| <div>{{lat}}</div> | |
| <iron-ajax auto | |
| url="http://127.0.0.1/data/2.5/station/find" | |
| params='{{updateSensorData(lat, lng, cnt)}}' | |
| last-response="{{ajaxResponse}}"> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <!-- | |
| Copyright (c) 2015 The Polymer Project Authors. All rights reserved. | |
| This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt | |
| The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt | |
| The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt | |
| Code distributed by Google as part of the polymer project is also | |
| subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt | |
| --> | |
| <link rel="import" href="../polymer/polymer.html"> | |
| <script> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var PolymerLifecycleMethods = [ | |
| 'created', | |
| 'ready', | |
| 'attached', | |
| 'detached', | |
| 'registered' | |
| ]; | |
| var PolymerObjectProperties = [ | |
| 'properties', |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| !function(t,e){"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?module.exports=e():(t.Promise=t.Promise||e(),t.PromisePolyfill=e())}(this,function(t){return function(){function e(t){this.state=e.state.PENDING,this.promise=t,this.result=null,this.pendingFulfillmentHandlers=[],this.pendingRejectionHandlers=[]}function n(t){var n=this.__deferred__=new e(this);if(!t)throw new Error("Promise constructor takes a function argument");t(c(n.resolve,n),c(n.reject,n))}var i=function(t){return!(!t||"function"!=typeof t)},r=function(t){return!!(t instanceof n)},o=function(t){return!!t&&t.hasOwnProperty("length")&&!t.propertyIsEnumerable("length")},s=function(t){var e;return null===t?!1:(e=typeof t,!("object"!==e&&"function"!==e||!("then"in t)))},u=function(){return t.setImmediate?t.setImmediate:t.requestAnimationFrame?t.requestAnimationFrame:function(e){t.setTimeout(e,0)}}(),c=function(t,e){return t.bind?t.bind(e):function(){return t.apply(e,arguments)}};return e.state={PENDING:"pending",FULFILL |