-
Notifications
You must be signed in to change notification settings - Fork 12
Open
Description
It makes sense to be able to set some global options. Two concrete examples that I encountered:
- arguments for the compiled idom render function
If the user prefers to use ctx as argument (for instance) instead of the default data, it is necessary to wrap the superviews template with <template>:
<template args="ctx">
<div>
hello {ctx.name}!
</div>
</template>If this was a config option, the user could simply do:
<div>
hello {ctx.name}!
</div>- Function prefix for the incremental dom calls
Currently superviews is calling the idom functions directly:
elementOpen("div");
elementClose("div");If the user is including incremental dom via a browser script, it is easier to reference the functions from the "IncrementalDOM" object that is exposed globally
IncrementalDOM === window.IncrementalDOM; // true
IncrementalDOM.elementOpen("div");
IncrementalDOM.elementClose("div");Metadata
Metadata
Assignees
Labels
No labels