Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var IncrementalDOM = require('incremental-dom');
- IncrementalDOM.patch(document.body, function(){
- IncrementalDOM.elementVoid('input', null, null, 'value', 'initial');
- });
- // Simulates typing some words in the <input>... (same results if you manually type in the input)
- document.querySelector('input').value = "NOT RIGHT";
- IncrementalDOM.patch(document.body, function(){
- IncrementalDOM.elementVoid('input', null, null, 'value', new String('Hello World'));
- IncrementalDOM.text('should be "Hello World"');
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement