tinwayJs example

tinwayJS – A JavaScript library for building user interfaces

website: https://tinway.org
github: https://github.com/tinway/tinwayJS

Example

1. Create index.html

<!DOCTYPE html>
<html>
<head>
&lt…

tinwayJS – A JavaScript library for building user interfaces

website: https://tinway.org
github: https://github.com/tinway/tinwayJS

Example

1. Create index.html

<!DOCTYPE html>
<html>
    <head>
        <meta charset="utf-8" />
        <title>tinwayJS - A JavaScript library for building user interfaces</title>
    </head>
    <body>
        <div id="app"></div>
        <script type="module" src="app.js"></script>
    </body>
</html>

2. Create app.js

import {run} from './tinway.js'

let test = () => console.log('test')
let start = () => console.log('start')

run({

    html:'./main.html',
    data: {
        test: test
    },
    start: start

})

import file tinway.js

function run() renders a web page!

  1. html: Path to html file.
  2. data: Connecting functions to html file.
  3. start: Run a function after rendering the page.

3. Create html file main.html

<h1>Test</h1>

<button onClick="window.tinway().test()">button test</button>

window.tinway().test() runs the created test function.

And here the fantasies of developers are endless 🙂

tinwayJs starts a new open web journey! more cool features to come!

Be with us 🙂


Print Share Comment Cite Upload Translate
APA
Yawnit | Sciencx (2024-03-29T11:14:29+00:00) » tinwayJs example. Retrieved from https://www.scien.cx/2022/06/28/tinwayjs-example/.
MLA
" » tinwayJs example." Yawnit | Sciencx - Tuesday June 28, 2022, https://www.scien.cx/2022/06/28/tinwayjs-example/
HARVARD
Yawnit | Sciencx Tuesday June 28, 2022 » tinwayJs example., viewed 2024-03-29T11:14:29+00:00,<https://www.scien.cx/2022/06/28/tinwayjs-example/>
VANCOUVER
Yawnit | Sciencx - » tinwayJs example. [Internet]. [Accessed 2024-03-29T11:14:29+00:00]. Available from: https://www.scien.cx/2022/06/28/tinwayjs-example/
CHICAGO
" » tinwayJs example." Yawnit | Sciencx - Accessed 2024-03-29T11:14:29+00:00. https://www.scien.cx/2022/06/28/tinwayjs-example/
IEEE
" » tinwayJs example." Yawnit | Sciencx [Online]. Available: https://www.scien.cx/2022/06/28/tinwayjs-example/. [Accessed: 2024-03-29T11:14:29+00:00]
rf:citation
» tinwayJs example | Yawnit | Sciencx | https://www.scien.cx/2022/06/28/tinwayjs-example/ | 2024-03-29T11:14:29+00:00
https://github.com/addpipe/simple-recorderjs-demo