Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[context] Declarative alternative #44

Closed
rektide opened this issue Jul 29, 2023 · 1 comment
Closed

[context] Declarative alternative #44

rektide opened this issue Jul 29, 2023 · 1 comment

Comments

@rektide
Copy link

rektide commented Jul 29, 2023

I'm pretty surprised to see such an event-based implementation for context.

I'd love to see an alternative proposal offered for context that is declarative in nature. Existing APIs like onchange seem to offer pretty good hooks we could use to do a lot of the change detection. But meanwhile, we could be embedding more of the context on the page itself.

Different topic but for example WICG/webcomponents#1013 is talking about instantiating DOM Templates with microdata: that microdata or something sort of like it feels like what context could or should be.

There's no concrete proposals here. But I see the current shape & see issues like #39 which push to make context ever more ephemeral, with an event-based request-response protocol, and I just wish so much the declarative DOM could be leveraged to let us not need to add a bunch of new custom protocols. The challenge of context, to me, is embedding data in the dom & using it: that let's us do most of the work with what we already have, rather than invent so much new stuff.

@Westbrook
Copy link
Collaborator

Would you happen to have any broad strokes of an alternative approach here?

State inherently means that this will be happening in a JS context which means something will always be imperative about this code unless we magically get a full scripting extension to the language of HTML, so I'm not sure something like this could ever be fully declarative.

Without further insight or suggestion, closing as not actionable.

@Westbrook Westbrook closed this as not planned Won't fix, can't repro, duplicate, stale Nov 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants