Sha256: 8ddf34872639640bbfbe2ceb2588b92d9814a2ba40bc756eafdbd75c6a06aee7

Contents?: true

Size: 392 Bytes

Versions: 21

Compression:

Stored size: 392 Bytes

Contents

// Run this example by adding <%= javascript_pack_tag "hello_elm" %> to the
// head of your layout file, like app/views/layouts/application.html.erb.
// It will render "Hello Elm!" within the page.

import Elm from '../Main'

document.addEventListener('DOMContentLoaded', () => {
  const target = document.createElement('div')

  document.body.appendChild(target)
  Elm.Main.embed(target)
})

Version data entries

21 entries across 21 versions & 2 rubygems

Version Path
webpacker-3.0.2 lib/install/examples/elm/hello_elm.js