Skip to content

Instantly share code, notes, and snippets.

<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width, minimum-scale=1.0, initial-scale=1, user-scalable=yes">
<title>Sticky dialog</title>
<base href="https://polygit.org/polymer+v2.0.1/webcomponentsjs+v1.0.1/shadycss+webcomponents+v1.0.1/paper*+v2.0.0/iron*+v2.0.0/app*+v2.0.0/neon*+v2.0.0/components/">
@valdrinkoshi
valdrinkoshi / basic.html
Last active March 24, 2017 18:26
WCT config setup
<html><head>
<title>basic test</title>
<script src="../../web-component-tester/browser.js"></script>
</head>
<body>
<script>
test('no environment imports!', function() {
assert.equal(document.querySelectorAll('link[rel="import"]'), 0);
});
</script>
@valdrinkoshi
valdrinkoshi / .travis.yml
Created March 17, 2017 18:19
polymer-cli: travis and package.json templates
language: node_js
sudo: required
install: yarn install
node_js: '6'
addons:
firefox: latest
apt:
sources:
- google-chrome
packages:
@valdrinkoshi
valdrinkoshi / my-element.html
Last active March 14, 2017 23:56
Custom Elements not upgraded (chrome 57). Run `runner.html`
<script>
customElements.define('my-element', class MyElement extends HTMLElement {});
</script>
@valdrinkoshi
valdrinkoshi / blue.css
Last active January 19, 2017 01:25
IE11/Edge cloned stylesheets not working
div { background-color: blue; color: white; }
@valdrinkoshi
valdrinkoshi / doc-vs-url.html
Created January 18, 2017 21:59
1000 urls vs docs performance measurement
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>doc vs url</title>
<script src="../URL/url.js"></script>
</head>
<body>
<!doctype html>
<html>
<body>
<button onclick="count = total">stop</button>
<pre id="out"></pre>
<script>
var count = 0;
var total = 20;
var times = [];
console.log('currentScript', document.currentScript);
@valdrinkoshi
valdrinkoshi / shadydom-listeners.html
Last active November 3, 2016 00:29
Test performance of shadydom add/removeEventListener patch
<!doctype html>
<html>
<head>
<script>
ShadyDOM = {
force: true
};
</script>
<script src="shadydom.min.js"></script>
@valdrinkoshi
valdrinkoshi / stacking-context-crop.html
Created August 10, 2016 21:15
Stacking context causes cropping
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width, minimum-scale=1.0, initial-scale=1, user-scalable=yes">
<title>Stacking context causes cropping</title>
<style>