Skip to content

Instantly share code, notes, and snippets.

@valdrinkoshi
valdrinkoshi / heavy.html
Created July 13, 2016 00:35
Heavy scrolling for iron-dropdown performance tests
<!doctype html>
<html>
<!-- add this file in iron-dropdown/demo/ folder -->
<head>
<title>heavy scrolling</title>
<script src="../../webcomponentsjs/webcomponents-lite.js"></script>
<link rel="import" href="x-select.html">
</head>
<body>
@valdrinkoshi
valdrinkoshi / unconditional-paint.html
Last active August 10, 2016 21:22
unconditional paint for user-select and pointer-events
<!DOCTYPE html>
<!-- Open the dev tools and from the console run `runTests(10)` and observe the paiting that is triggered. -->
<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>unconditional paint for user-select and pointer-events</title>
@valdrinkoshi
valdrinkoshi / stacking-context-scroll.html
Created August 10, 2016 21:13
Stacking context causes scroll
<!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 scroll</title>
<style>
@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>
@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>
console.log('currentScript', document.currentScript);
<!doctype html>
<html>
<body>
<button onclick="count = total">stop</button>
<pre id="out"></pre>
<script>
var count = 0;
var total = 20;
var times = [];
@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>
@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 / 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>