-
-
Notifications
You must be signed in to change notification settings - Fork 5
Open
Labels
specSpec definition for non-well defined behaviorsSpec definition for non-well defined behaviors
Milestone
Description
Scope
unstable
What do you want to define?
The new ^
(sigil subject to change) would prevent the directive from being executed by server-side APIs, but would be processed by client-side APIs
Considerations:
- There-is no need for a server-side equivalent, since the use case would be to partially render with ssr before submitting to client which will then be able to use mizu normally
- It is unclear whether this should be a regex directive, or handled by the renderer directly
- It could be either the client side api choose accepts and ignore the
^
sigil altogether- Then the
parseAttribute
method would take this into account
- Then the
- Or the server would "clean" the
^
sigil before serving to client, through an API- Unlike former solution, this one "loses" information since once processed it's not possible to know whether a directive was client-side only
- Additionally this force an attribute ref changes since names cannot be modified
- It could be either the client side api choose accepts and ignore the
- A directive with this pre-modifier should not be cleaned by
*clean.directives
as it wasn't processed yet
Example usage
<p *if="true" ^*text="new Date()"></p>
await Mizu.render(template)
<p *text="new Date()"></p>
<p ^*text="new Date()"></p>
I have searched for existing issues
Yes
Metadata
Metadata
Assignees
Labels
specSpec definition for non-well defined behaviorsSpec definition for non-well defined behaviors