Skip to content

Playwright is a framework for Web Testing and Automation. It allows testing Chromium, Firefox and WebKit with a single API.

562 B
Raw Blame
<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>