Created
December 27, 2018 16:01
-
-
Save StefanNieuwenhuis/8d13a070848090a2b8cfd9503a873470 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html dir="ltr" lang="en"> | |
<head> | |
<meta charset="utf-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=5.0"> | |
<title>Stencil Component Starter</title> | |
<script src="/build/mycomponent.js"></script> | |
</head> | |
<body> | |
<my-component></my-component> | |
<button>Open modal</button> | |
<script> | |
const button = document.querySelector('button'); | |
const component = document.querySelector('my-component'); | |
button.addEventListener('click', () => { | |
component.setAttribute('is-active', true); | |
}); | |
</script> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment