12345678910111213141516171819202122232425262728293031323334353637383940 |
- <!doctype html>
- <html>
- <head>
- <title>Trapped - Counter example</title>
- <style>
- [data-trap] {
- display: none
- }
- button {
- font-family: monospace;
- }
- </style>
- <meta name="author" content="Herbert Vojčík" />
- <script type='text/javascript' src='../the.js'></script>
- <script type="text/javascript">
- var blackboard;
- require.config({baseUrl: '..'});
- require(
- ["app", "trapped-counter/Trapped-Counter" ],
- function (amber) {
- amber.initialize({
- //used for all new packages in IDE
- 'transport.defaultAmdNamespace': "trapped-counter"
- });
- require(["amber-ide-starter-dialog"], function (dlg) { dlg.start(); });
- $(function () {
- blackboard = amber.globals.App._new();
- amber.globals.Trapped._start_([blackboard]);
- });
- }
- );
- </script>
- </head>
- <body>
- <h2 data-trap="App ~value"></h2>
- <button data-trap="App: (signal increment) whenClicked">++</button>
- <button data-trap="App: (signal decrement) whenClicked">--</button>
- </body>
- </html>
|