Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

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

Notifications You must be signed in to change notification settings

Doist/node.magic_dom

Open more actions menu

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
Morty Proxy This is a proxified and sanitized view of the page, visit original site.