- Carson(?) - improve
fetchcommand w/ more obvious syntax for body, headers, etc.fetch /foo with a POST fetch /foo with a POST and body {foo:"bar"} fetch /foo with a POST and body {foo:"bar"} and headers {blah:'blah'}- make defaults pluggable
- event model
- Change feature installation to use
israther thaninstall(maybe both?) - Support a
timeoutmodifier for commands likefetch,call,wait foretc. - general support is a deep project involving dealing w/ async commands not executing if they time out during execution
- maybe just timeout for specific commands ?
- Ben(?) - Better DOM manipulation tools? (needs research)
- Recovering parser (we are single error right now)
deletecommandfocuscommandreply&wait for responsein event handlers?merge/merge into- Merge objects with one another- runtime type checked parameters and return types
def(foo:String!) : String! end - Full
sedcommand for string manipulation? playcommand using Web Audio API- Support parenthesizes expressions in pseudopossessives:
transition (the div's parent's parent)'s opacity to 1 - Event model
- functions should be able to be marked
syncto make only one execution at a time occur, in serial fashion - Make
first, last, randomwork as identifiers (backtracking parser) - repeat command improvements
// By default, counter uses "it" convention repeat from 1 to 10 put it in myVar end - date/time library See GitHub
- Expressions for
field,button,tagandnodeListSee GitHub - Event for DOM mutation commands (put, append, render) -- user can add listener to initialize inserted content
- hyperscript has three levels of scoping:
local- bound to the current feature's execution lifespanelement- bound to the DOM element's lifespanglobal- bound to the global page lifespan
- The default scope is
local- local variables are "hoisted" as with the
varstatement in javascript so all variables are "top level" - hyperscript does not throw an error when a symbol is referred to that has not been initialized. Instead you
will get the value
undefined
- local variables are "hoisted" as with the
- Variables are declared implicitly by setting a value to a name
- When setting a value using the form
set x to 10, hyperscript follows this resolution process:- examine the
localscope, ifxexists, update its value - examine the
elementscope, ifxexists, update its value - examine the
globalscope, ifxexists, update its value - if the variable does not exist in any of these scopes, create the variable in the local scope
- examine the
- When reading a variable
x, the following algorithm is used- examine the
localscope, ifxexists, return its value - examine the
elementsscope, ifxexists, return its value - examine the
globalscope, ifxexists, return its value
- examine the
- hyperscript behaviors each have their own isolated
elementscopeelementscoped variables are not shared between behaviors or between a behavior and the normal element scope- There is no mechanism for referencing the normal element scopes values from within a behavior
- All constructor arguments to behaviors are scoped at the
elementlevel and shared across features within the behavior
- If you wish to explicitly create a global variable, you must use the
globalkeyword:set global x to 10 - If you wish to explicitly create an element variable, you must use the
elementkeyword:set element x to 10 - Lower level scopes may mask upper levels of scope by explicitly specifying the level at which a variable is set:
set global x to 10 -- sets a global variable x to 10 set local x to 20 -- sets a local variable x to 20 log global x -- logs 10 log local x -- logs 20 log x -- logs 20 per the resolution algorithm outlined above - For readability, getting and setting a
elementscoped variable may use a pseudo-possessive's<div _="init set the element's foo to 10 on click put foo into me"> Click me... </div>