-
Notifications
You must be signed in to change notification settings - Fork 82
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
State change debounce #50
Open
efpage
wants to merge
11
commits into
vanjs-org:main
Choose a base branch
from
efpage:State-change-debounce
base: main
Could not load branches
Branch not found: {{ refName }}
Could not load tags
Nothing to show
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This commit adds the auto-Append feature to van.js. Objects created between begin( ID) and end() are appended as a child to element(ID). ID can be either an element ID or a dom-reference. let b = div() begin(d) h1("headline") p("This is text") end() You can start building a document using begin(document.body) ... end() begin() returns a DOM-referencs, so you can also write van.add(document.body, begin(div())) ..... end; end can have an index end(3) to have repeated calls of end
Add DML-functions to VanJS as an add-on. Just load van_dml.js as a script after VanJS.js to extend functionallity
Description for van_dml.js
Extended Readme for vanDML
Typos fixed
Van still provides the tools to limit the update rate. ```JS let {updateRate} = van updateRate(100) ``` This set´s the update rate to 100ms. state changes are delayed by up to 100 ms, before they are propagated to the DOM. If multiple changes are applied withi this time, only the last is updating the DOM.
This reverts commit 5931f69.
This reverts commit 944ae80.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Van propagates every state change immediately to the bound DOM elements. This may result in a bad user experience, if too many changes are applied at a high frequency.
VanJs contains everything to limit the state change rate. It just requires to set one variable to use it. I provided this variable and a setter to change it. I provided a possible implementation, if there are other ways this would be ok.