-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #5 from matthieubulte/master
remove namespace and key parameters from vnode signature
- Loading branch information
Showing
3 changed files
with
40 additions
and
18 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,7 +16,6 @@ | |
"package.json" | ||
], | ||
"dependencies": { | ||
"purescript-maybe": "~0.2.0", | ||
"purescript-dom": "~0.1.1" | ||
} | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,41 @@ | ||
module Test where | ||
|
||
import Data.Maybe | ||
import VirtualDOM | ||
import VirtualDOM.VTree | ||
import Debug.Trace | ||
|
||
|
||
doc1 :: VTree | ||
doc1 = vnode "div" {} [vtext "hello"] Nothing Nothing | ||
doc1 = vnode "div" {} [vtext "hello"] | ||
|
||
doc2 :: VTree | ||
doc2 = vnode "div" {} [vtext "hello", vtext "world"] Nothing Nothing | ||
doc2 = vnode "div" {} [vtext "hello", vtext "world"] | ||
|
||
doc3 :: VTree | ||
doc3 = vtext "hello world" | ||
|
||
doc4 :: VTree | ||
doc4 = vnode "div" | ||
{ "namespace": "http://www.w3.org/2000/svg" | ||
, "key": "my key" | ||
} [vtext "Am I SVG?"] | ||
|
||
doc5 :: VTree | ||
doc5 = vnode "div" | ||
{ "key": "another key" | ||
, "namespace": "http://www.w3.org/1999/xhtml" | ||
, "style": { "color": "red" | ||
, "height": "10px" | ||
, "width": "100px" | ||
} | ||
} [vtext "I do it with style."] | ||
|
||
main = do | ||
print doc1 | ||
print doc2 | ||
print doc3 | ||
print doc4 | ||
print doc5 | ||
|
||
print $ diff doc1 doc2 | ||
print $ diff doc1 doc3 |
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