From 6869ccb3e71375c2d698ebb3dc60cedace3c202a Mon Sep 17 00:00:00 2001
From: Ayo
Date: Sat, 18 Nov 2023 10:31:12 +0100
Subject: [PATCH] feat: more explainer for using WebComponent.props
- update readme with more read/write access explanation and example
- update demo page to use .props
---
README.md | 41 ++++++++++++++++++++++++++++++++++-------
demo/index.html | 4 ++--
2 files changed, 36 insertions(+), 9 deletions(-)
diff --git a/README.md b/README.md
index fb95470..f666fb9 100644
--- a/README.md
+++ b/README.md
@@ -73,6 +73,8 @@ In your HTML page:
setTimeout(() => {
helloWorld.setAttribute('emotion', 'excited');
+ // or:
+ helloWorld.props.emotion = 'excited';
}, 2500)
-
+
@@ -20,7 +20,7 @@