Skip to content

Instantly share code, notes, and snippets.

/**
* @record
*/
var LocalDomWithBackground = function(){};
/**
* @type HTMLElement
*/
LocalDomWithBackground.prototype.backgroundFrontLayer;
/**
'use strict';
try {
Promise.resolve(true).then(function{
undefinedVariable = [];
console.log("Boo");
}, function(err) {
console.log(err)
})
} catch (err) {
console.log(err.stack)
// findBodyElements returns a document fragment containing
// all elements that should be moved into body from a document-order
// array of elements in head, searching from startIndex to endIndex
function findBodyElements(flatHead, startIndex, endIndex) {
if (endIndex === -1) {
endIndex = flatHead.length;
}
var container = dom5.constructors.fragment();
for (var headidx = start, el; headidx < endIndex; headidx++) {
el = flatHead[headidx];
// BowerJSON represents a bower.json file
type BowerJSON struct {
Dependencies *map[string]string `json:"dependencies, omitempty"`
DevDependencies *map[string]string `json:"devDependencies, omitempty"`
}
Polymer.fc = {
properties: {
_elevation: {
type: Number
}
},
observers: ["_calculateElevation(focused, disabled, active, pressed, receivedFocusFromKeyboard)"],
hostAttributes: {
role: "button",
tabindex: "0"
Polymer.Pd = {
properties: {
pressed: {
type: Boolean,
readOnly: !0,
value: !1,
reflectToAttribute: !0,
observer: "_pressedChanged"
},
toggles: {
function ErrorSwallowingFSResolver(config) {
FSResolver.call(this, config);
}
ErrorSwallowingFSResolver.prototype = Object.create(FSResolver.prototype);
ErrorSwallowingFSResolver.prototype.accept = function(uri, deferred) {
var reject = deferred.reject;
deferred.reject = function(arg) {
deferred.resolve("");
@garlicnation
garlicnation / shards.sh
Last active September 26, 2015 02:51
Example sharded vulcanize
npm install -g git+ssh://[email protected]:PolymerLabs/web-component-shards.git
git clone https://github.com/PolymerElements/paper-button.git
cd paper-button
git checkout sampleShards
bower install
web-component-shards -e index.html -e paper-button.html
cd dist
http-server
# Open up a browser and check out the functional iron-component-page.
@garlicnation
garlicnation / exampleBehavior.js
Created September 15, 2015 08:49
behavior singleton model
(function(){
var SocketConnection = function() {
this.connection = instanceConnection();
};
// This is a globally shared connection.
var singletonConnection = null;
window.SocketConnectionBehavior = {
<paper-tabs scrollable id="active" attr-for-selected="value" selectable selected="{{active}}">
<template is="dom-repeat" items="[[docElements]]">
<paper-tab value="[[item.is]]">[[item.is]]</paper-tab>
</template>
<template is="dom-repeat" items="[[docBehaviors]]">
<paper-tab value="[[item.is]]">[[item.is]]</paper-tab>
</template>
</paper-tabs>