Skip to content

Instantly share code, notes, and snippets.

View ChadKillingsworth's full-sized avatar

Chad Killingsworth ChadKillingsworth

View GitHub Profile
@ChadKillingsworth
ChadKillingsworth / reflection-config.json
Created June 17, 2018 00:23
Closure Compiler Graal Reflection
[
{
"name" : "com.google.javascript.jscomp.CommandLineRunner$Flags",
"allDeclaredFields" : true
},
{
"name" : "com.google.javascript.jscomp.CommandLineRunner$Flags$BooleanOptionHandler",
"allDeclaredConstructors" : true,
"allDeclaredMethods": true
},
@ChadKillingsworth
ChadKillingsworth / original-element.html
Last active August 13, 2017 12:13
polymer-webpack-loader create new files
<!-- before loader -->
<link rel="import" href="other-element.html">
<dom-module id="original-element">
<template>Hello World</template>
<script>
class OriginalElement extends Polymer.Element {
static get is() { return 'original-element'; }
}
customElements.define(OriginalElement.is, OriginalElement);
@ChadKillingsworth
ChadKillingsworth / index.html
Last active January 18, 2017 15:01 — forked from anonymous/index.html
Polymer Colliding Property// source http://jsbin.com/suwupas
<!doctype html>
<head>
<meta charset="utf-8">
<title>Polymer Colliding Property</title>
<script src="//cdnjs.cloudflare.com/ajax/libs/webcomponentsjs/0.7.23/webcomponents-lite.min.js"></script>
<link href="https://raw.githubusercontent.com/Polymer/polymer/v1.7.1/polymer.html" rel="import">
</head>
<body>
<colliding-element></colliding-element>
@ChadKillingsworth
ChadKillingsworth / e2e-shadowdom.md
Last active July 6, 2023 06:54
Selenium Testing with Shadow DOM

End-to-end Testing with Shadow DOM

As the web component specs continue to be developed, there has been little information on how to test them. In particular the /deep/ combinator has been deprecated in Shadow DOM 1.0. This is particularly painful since most end-to-end testing frameworks rely on elements being discoverable by XPath or calls to querySelector. Elements in Shadow DOM are selectable by neither.

WebDriver.io

Webdriver.io has the standard actions by selectors, but also allows browser executable scripts to return an element

Keybase proof

I hereby claim:

  • I am chadkillingsworth on github.
  • I am chadkillingswort (https://keybase.io/chadkillingswort) on keybase.
  • I have a public key whose fingerprint is 583E 87F0 26D9 46DD 1B8F EE6D 249D F1A0 69E9 492B

To claim this, I am signing this object:

@ChadKillingsworth
ChadKillingsworth / ClosureCompilerExportsDesign.md
Last active August 29, 2015 14:20
Closure-Compiler Export Design

Closure-Compiler Generated Exports

This document outlines the design for policies related to the @export annotation and the methodologies that Closure-compiler will use to generate such exports.

Closure Compiler export methodologies currently fall into two categories:

  • Shadowing: an alias to the symbol is created as either a property on the global object or as a variable in the global namespace.
  • Not Renaming: quoted properties are used to prevent the compiler from renaming a symbol.

The goal is to give the developer both a convenient and flexible option for exporting symbols which allows as many of the compiler checks and optimizations to apply as possible.