FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
hyperHTML/test/article.html at hyperhtml-style · lineCode/hyperHTML · GitHub
lineCode
/
hyperHTML
Public
forked from
WebReflection/hyperHTML
Notifications
You must be signed in to change notification settings
Fork
0
Star
0
Code
Pull requests
0
Actions
Projects
Security and quality
0
Insights
Additional navigation options
Code
Pull requests
Actions
Projects
Security and quality
Insights
Expand file tree
Breadcrumbs
hyperHTML
/
test
/
article.html
Copy path
More file actions
More file actions
Latest commit
History
History
History
38 lines (36 loc) · 899 Bytes
Breadcrumbs
hyperHTML
/
test
/
article.html
Copy path
File metadata and controls
38 lines (36 loc) · 899 Bytes
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
<!doctype html
>
<
html
>
<
head
>
<
meta
name
="
viewport
"
content
="
width=device-width, initial-scale=1.0
"
>
<
style
>
body
{
font-family
:
sans-serif; }
</
style
>
<
script
src
="
../min.js
"
>
</
script
>
</
head
>
<
body
>
<
article
>
</
article
>
</
body
>
<
script
>
function
update
(
render
,
state
)
{
render
`
<article data-magic="
${
state
.
magic
}
">
<h3>
${
state
.
title
}
</h3>
List of
${
state
.
paragraphs
.
length
}
paragraphs:
<ul>
${
state
.
paragraphs
.
map
(
p
=>
hyperHTML
.
wire
(
p
)
`
<li>
${
p
.
title
}
</li>`
)
}
</ul>
</article>
`
;
}
const
articleElement
=
document
.
querySelector
(
'article'
)
;
const
state
=
{
title
:
'True story'
,
magic
:
true
,
paragraphs
:
[
{
title
:
'touching'
}
,
{
title
:
'incredible'
}
,
{
title
:
'doge'
}
]
}
;
const
render
=
hyperHTML
.
bind
(
articleElement
)
;
update
(
render
,
state
)
;
</
script
>
</
html
>
Back
|
FazBrowse Home
|
New Git URL