1+ <!DOCTYPE html>
2+ < html >
3+
4+ < head >
5+ < meta charset ="utf-8 " />
6+ < meta http-equiv ="X-UA-Compatible " content ="IE=edge ">
7+ < title > Counter example with debugger</ title >
8+ < meta name ="viewport " content ="width=device-width, initial-scale=1 ">
9+
10+ < script src ="https://unpkg.com/hyperapp "> </ script >
11+ < script src ="hyperapp-devtools.js "> </ script >
12+ </ head >
13+
14+ < body >
15+ < p > Note: this is example is meant to show how the devtools handles overflow, it is not meant to represent a functional/usefull
16+ app.</ p >
17+ < div id ="app " />
18+ < br />
19+ < br />
20+ < a href ="index.html "> Back to index</ a >
21+
22+ < script >
23+ const h = hyperapp . h
24+
25+ const state = {
26+ value : 0 ,
27+ loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooogName : 0 ,
28+ }
29+
30+ const actions = {
31+ noop : value => ( { } ) ,
32+ loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooogName : ( ) => ( state , actions ) => {
33+ actions . noop ( )
34+ actions . noop ( )
35+ actions . noop ( )
36+ actions . noop ( )
37+ actions . noop ( )
38+ actions . noop ( )
39+ actions . noop ( )
40+ actions . noop ( )
41+ actions . noop ( )
42+ actions . noop ( )
43+ actions . noop ( )
44+ actions . noop ( )
45+ actions . noop ( )
46+ actions . noop ( )
47+
48+ return {
49+ value : state . value + 1000 ,
50+ loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooogName : state . value + 1000
51+ }
52+ }
53+ }
54+
55+ const view = ( state , actions ) => (
56+ h ( "div" , { style : { margin : "2rem" } } ,
57+ h ( "h1" , { style : { margin : "0.5rem" } } , state . value ) ,
58+ h ( "button" , { onclick : actions . loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooogName } , "+1000" ) ,
59+ )
60+ )
61+
62+ devtools ( hyperapp . app ) ( state , actions , view , document . getElementById ( "app" ) )
63+
64+ </ script >
65+
66+ </ body >
67+
68+ </ html >
0 commit comments