>
> If nothing is wrong with Web Components, why not use them?
>>>>
>>>
>> There are a ton of them
>> <https://elements.polymer-project.org/browse?package=paper-elements> you
>> could use right now, for MDL in particular, that work right off the shelf.
>>
>>
> You make it sound like it's a trivial thing for a beginner to integrate
> Polymer with Elm and hit the ground running.
>
> I seriously doubt that this is the case but I'll take another look at the
> projects that have attempted to do this. :)
>
1. npm install Polymer
2. Add <link rel="import" href="/node_modules/Polymer/polymer.html"/> to
your index.html
3. Add this before the script that imports your elm.js: <script>
// register an element
MyElement = Polymer({is: 'my-element',
created: function() { this.textContent = 'My element!'; }
});
</script>
4. In your Elm code, run Html.node "my-element" [] []
I just tried this and it worked. :)
>
--
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.