frontend-js-example/index.html

27 lines
774 B
HTML
Raw Normal View History

2024-03-31 16:54:55 -05:00
2024-03-31 15:05:36 -05:00
<!DOCTYPE html>
<html>
<head>
<title>FrontendJS Example</title>
</head>
2024-03-31 15:08:42 -05:00
<script src="frontend.js"></script>
2024-03-31 15:05:36 -05:00
<script>
2024-03-31 16:54:55 -05:00
initBody()
2024-03-31 15:05:36 -05:00
clearPage()
2024-03-31 16:54:55 -05:00
writeHTML("body", markdownToHTML(`# Hello world!
This is an example of how to properly use Frontend JS.
Also it's a test if things are working.
* Air
* Water
* Fire
* Dirt
* ####ing magnets, how do they work!?!
`))
createParagraph("paragraphLorum", `Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed pulvinar nisl eu risus tincidunt, non aliquet metus tempor. Duis ac tortor commodo, venenatis leo at, consectetur nulla.`)
2024-03-31 15:05:36 -05:00
let dino = createButton("dino", "dino sound")
changeAttributes(dino, {"onclick": "playAudio(`https://interactive-examples.mdn.mozilla.net/media/cc0-audio/t-rex-roar.mp3`, 0.4)"})
</script>
2024-03-31 16:54:55 -05:00
</html>