【文件属性】:
文件名称:elm-html-and-js:如何将Elm与HTML和JS集成的示例
文件大小:6KB
文件格式:ZIP
更新时间:2021-04-16 09:08:23
HTML
HTML / JS集成—
该项目说明了如何在HTML页面中嵌入Elm程序以及如何与JavaScript进行通信。
制作说明
git clone https://github.com/evancz/elm-html-and-js.git
cd elm-html-and-js
elm-make Stamps.elm --output elm.js
open index.html
API使用概述
如果您创建一个名为Stamps的Elm模块,它将在JavaScript中命名为Elm.Stamps 。 要实例化模块,可以使用以下任何功能:
Elm . fullscreen ( Elm . Stamps , { reset : [ ] } ) ; // take over the whole page
Elm . embed ( Elm . Stamps , div , { reset : [
【文件预览】:
elm-html-and-js-master
----elm-package.json(386B)
----.gitignore(18B)
----Stamps.elm(1KB)
----README.md(2KB)
----resources()
--------texture.png(2KB)
----index.html(2KB)