Skip to content

jon49/RootDom

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 

Repository files navigation

RootDom

E.g.,

test = 
   new RootEl(
      ['div', {id: 'write2'}, [
         ['h1', {text: "Orange2!", update: {title: ['text', 'title']}}],
         ['p', {update: {title: ['text']}}],
         ['a', {update: {yep: ['text'], url: ['href']}}]
      ]])
document.body.appendChild(test.el)

To update:

test.update({title: "Yellow!", yep: "OK", url: "https://example.com"})

Note that you do not need to have all the different values, you can update with just a partial object and those will not be updated. To remove a value set the value to null or undefined:

test.update({title: undefined})

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published