- From: Bruce B. Anderson <notifications@github.com>
- Date: Sat, 11 Nov 2023 14:02:34 -0800
- To: WICG/webcomponents <webcomponents@noreply.github.com>
- Cc: Subscribed <subscribed@noreply.github.com>
- Message-ID: <WICG/webcomponents/issues/1035/1806927949@github.com>
[This](https://github.com/bahrus/be-set) is how I plan to implement the idea above in userland: For static settings: ```html <html> <head> <script id=my-settings be-set type=application/json> { "input": { "readOnly": true } } </script> </head> <body> ... <div be-set="Apply settings from #my-settings."> <input> </div> </body> ``` For dynamic settings that can be affected by the host: ```html <html> <head> <script id=my-settings be-set type=application/json> { "input": { "readOnly": "isHappy" } } </script> </head> <body> ... <mood-stone is-happy> #shadow <div be-set="Apply settings from #my-settings with model coming from host."> <input> </div> </mood-stone> </body> </html> ``` Uses [DTR](https://github.com/bahrus/trans-render#declarative-trans-render-syntax-via-json-serializable-rhs-expressions-with-libdtrjs) syntax, which also supports things like interpolation for hyperlinks. That syntax would benefit from DOM parts, so full steam ahead! Would also benefit from support for custom enhancements, [w3c willing](https://github.com/WICG/webcomponents/issues/1000). -- Reply to this email directly or view it on GitHub: https://github.com/WICG/webcomponents/issues/1035#issuecomment-1806927949 You are receiving this because you are subscribed to this thread. Message ID: <WICG/webcomponents/issues/1035/1806927949@github.com>
Received on Saturday, 11 November 2023 22:02:39 UTC