Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR HTML

embed elm into html

<!DOCTYPE html>
<html>
    <head>
        <title>Hello World</title>
    </head>
    <body>
        <div id='app'></div>
        <script src="elm.js"></script>
        <script>
            Elm.Main.embed(document.getElementById('app'))
        </script>
    </body>
</html>

<!-- You can also use a <body> tag but some Chrome extensions may mess with it. 
Best to use <div>. -->
Source by riptutorial.com #
 
PREVIOUS NEXT
Tagged: #embed #elm #html
ADD COMMENT
Topic
Name
8+8 =