Skip to content

Instantly share code, notes, and snippets.

@sz332
sz332 / shadowdom.html
Last active February 21, 2018 14:44
Shadow dom
<html>
<body>
<div id="wrapper">
</div>
<div>This has normal color.</div>
<script>
child.html
<div class="part">
<style>
h3 {
color: red !important;
}
</style>
<h3>Warning!</h3>
<p>This page is under construction</p>
public interface IConnect {
public void connect() throws CriticalException;
}
public class ReconnectProxy implements InvocationHandler {
public static final long RECONNECT_DELAY = 5000;
public static final String MESSAGE_CONNECT = "connect";
ExecutorService threadPool;
Polymer outside click element
window.addEventListener((e) {
var target = event.target;
while(target != this && target != document.body) {
target = Polymer.dom(target).node.domHost.parentNode;
// might need some additional steps to get the parent from inside custom elements
// don't know by heart
}