Packages

Playwright Assets is a package for installing and running test assets in Playwright Node.js and Elixir implementations.

Current section

Files

Jump to
playwright_assets priv assets shadow-dom-link.html
Raw

priv/assets/shadow-dom-link.html

<html>
<head>
<script>
customElements.define('my-link',
class extends HTMLElement {
constructor() {
super();
const template = document.getElementById('my-link-template');
const templateContent = template.content;
this.attachShadow({mode: 'open'}).appendChild(
templateContent.cloneNode(true)
);
}
}
);
window.clickCount = 0;
</script>
</head>
<body>
<template id="my-link-template">
<a href="#" id="inner-link" onclick="clickCount++"><slot></slot></a>
</template>
<my-link>Sign up</my-link>
</body>
</html>