You can atach Elm to the window object like this:

<script>window.Elm = require('./main.js');</script>

then you do:

var node = document.getElementById('main');
var yourApp = Elm.Todo.fullscreen(node);

You can see this here: 
https://github.com/nirgn975/Elmctron/blob/master/src/index.html#L11
On Monday, September 5, 2016 at 12:44:53 AM UTC+3, A. Hernandez wrote:
>
> Hi all, 
>
> I am attempting to use Elm 0.17 for an Electron app (using 
> `electron-prebuilt` 1.3.5). However, I've run into a snag where an `Elm is 
> not defined` error raises on launch. For some reason, `Elm` isn't a global 
> variable in Electron. It is global when run in the browser though.
>
> Does this have to do with the Chromium version? More importantly: is there 
> a way to fix this issue?
>

-- 
You received this message because you are subscribed to the Google Groups "Elm 
Discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to