UNPKG

@revoloo/cypress6

Version:

Cypress.io end to end testing tool

30 lines (25 loc) 714 B
<!DOCTYPE html> <html> <head> <title>Custom Elements</title> </head> <body> <cy-custom-element></cy-custom-element> <script type="text/javascript"> // define empty functions to stub in tests window.customElementConstructor = function () {} window.customElementAttributeChanged = function () {} if (window.customElements) { window.customElements.define('cy-custom-element', class extends HTMLElement { constructor () { super() window.customElementConstructor() } attributeChangedCallback () { window.customElementAttributeChanged() } }) } </script> </body> </html>