An Interest In:
Web News this Week
- April 23, 2024
- April 22, 2024
- April 21, 2024
- April 20, 2024
- April 19, 2024
- April 18, 2024
- April 17, 2024
June 28, 2022 07:08 pm GMT
Original Link: https://dev.to/tinway/tinwayjs-example-5aj8
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> <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!
- html: Path to html file.
- data: Connecting functions to html file.
- 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 :)
Original Link: https://dev.to/tinway/tinwayjs-example-5aj8
Share this article:
Tweet
View Full Article
Dev To
An online community for sharing and discovering great ideas, having debates, and making friendsMore About this Source Visit Dev To