usage in html
<link rel="stylesheet" href="./ecl-eu.css">
<script src="./ewc-modal/src/main.mjs" type="module"></script>
<ewc-modal id="a"></ewc-modal>
<script type="module">
import * as Styling from "./ewc-modal/src/externalStyling.mjs"
document.addEventListener("DOMContentLoaded", function(event) {
Styling.applyEclClasses()
})
</script>
<script>
document.addEventListener("DOMContentLoaded", function(event) {
document.getElementById("a").title = "Hello"
document.getElementById("a").bodyHtml = "<h1>Sworld!</h1><ul><li>bla</li></ul>"
document.getElementById("a").visible = true
})
</script>
Note that alternative external styling is supported - see also externalStyling.mjs.
API
There are no properties and no attribs, just setters:
- visible - =true to show, =false to hide
- title - sets the header text
- bodyHtml - sets the body html
Screenshot
