Skip to content

node.magic_dom: A DSL for building HTML in node.js

Notifications You must be signed in to change notification settings

dickon/node.magic_dom

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 

Repository files navigation

MagicDOM - a DSL for building HTML in node.js

More information: node.magic_dom: A DSL for building HTML in node.js

Example 1

JS code: sys.puts( DIV({id: 'meaning', onclick: 'alert(42)'}, "Meaning") )

Output:

<div id="meaning" onclick="alert(42)">Meaning</div>

Example 2

JS code:

var link, my_template;
my_template = DIV(
    link = A({href: 'http://www.spam.com'}, 'Click me!!!')
)
sys.puts(my_template)

Output:

<div><a href="http://www.spam.com">Click me!!!</a></div>

About

node.magic_dom: A DSL for building HTML in node.js

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published