Skip to content
This repository was archived by the owner on May 3, 2023. It is now read-only.

Commit bc8585d

Browse files
committed
README notes
1 parent fb2a163 commit bc8585d

File tree

3 files changed

+15
-16
lines changed

3 files changed

+15
-16
lines changed

README.md

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22

33
A small JavaScript package to let you wrap your Elm applications up in a web component.
44

5+
## NOTE: this documentation is for v0.7.0-beta, which supports V1 of the Web Elements spec. If you still need V0, please [check the docs for 0.6.1](https://github.com/thread/elm-web-components/tree/0.6.1)
6+
57
## Install
68

79
```
@@ -10,7 +12,7 @@ yarn add @teamthread/elm-web-components
1012

1113
## Configuration (new in 0.6.0)
1214

13-
We support both Elm 0.18 and 0.19 for now. You must configure the module so it knows which one to support:
15+
We support both Elm 0.18 and 0.19. You must configure the module so it knows which one to support:
1416

1517
```js
1618
elmWebComponents.configure('0.18')
@@ -28,6 +30,7 @@ Given the following Elm app:
2830
module Main exposing (..)
2931

3032
import Html exposing (text, Html)
33+
import Browser
3134

3235
type Msg
3336
= NoOp
@@ -57,7 +60,7 @@ init flags =
5760

5861
main : Program Flags Model Msg
5962
main =
60-
Html.programWithFlags
63+
Browser.element
6164
{ init = init, update = update, subscriptions = \_ -> Sub.none, view = view }
6265
```
6366

@@ -76,7 +79,7 @@ And now in your HTML you can use the component:
7679
<demo-elm-component name="Jack"></demo-elm-component>
7780
```
7881

79-
Any attributes are passed into your Elm app as Flags, so make sure you use `programWithFlags` if you care about them. If you don't you can just use `Html.program` as you would normally.
82+
Any attributes are passed into your Elm app as Flags.
8083

8184
## Ports
8285

@@ -158,3 +161,12 @@ This is useful for tidying up any event listeners you might have.
158161
## Examples
159162

160163
You can find full examples in the `example` directory. If you have cloned the repository, you can run `yarn run example` to run them locally.
164+
165+
## Polyfilling for older browsers
166+
167+
elm-web-components does not ship with any polyfills. You should ensure the following functions are available in all browsers you support:
168+
169+
* `Object.assign`
170+
* `Object.keys`
171+
172+
And additionally ensure that you've included a polyfill for custom elements. We recommend [document-register-element](https://github.com/WebReflection/document-register-element).

package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@
2828
"@babel/preset-env": "^7.3.1",
2929
"babel-loader": "^8.0.5",
3030
"core-js": "^2.6.4",
31-
"document-register-element": "^1.13.1",
3231
"elm-format": "^0.8.0",
3332
"prettier": "1.10.2",
3433
"webpack": "^4.17.1",

yarn.lock

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1814,13 +1814,6 @@ dns-txt@^2.0.2:
18141814
dependencies:
18151815
buffer-indexof "^1.0.0"
18161816

1817-
document-register-element@^1.13.1:
1818-
version "1.13.1"
1819-
resolved "https://registry.yarnpkg.com/document-register-element/-/document-register-element-1.13.1.tgz#dad8cb7be38e04ee3f56842e6cf81af46c1249ba"
1820-
integrity sha512-92ZyLDKg9j4rOll//NNXj25f+8rAzOkYsGJonhugKwXfeqH7bzs8Ucpvey0WzZ2ZzKdrvW9RnUw3UyOZ/uhBFw==
1821-
dependencies:
1822-
lightercollective "^0.1.0"
1823-
18241817
domain-browser@^1.1.1:
18251818
version "1.1.7"
18261819
resolved "https://registry.yarnpkg.com/domain-browser/-/domain-browser-1.1.7.tgz#867aa4b093faa05f1de08c06f4d7b21fdf8698bc"
@@ -2994,11 +2987,6 @@ lcid@^2.0.0:
29942987
dependencies:
29952988
invert-kv "^2.0.0"
29962989

2997-
lightercollective@^0.1.0:
2998-
version "0.1.0"
2999-
resolved "https://registry.yarnpkg.com/lightercollective/-/lightercollective-0.1.0.tgz#70df102c530dcb8d0ccabfe6175a8d00d5f61300"
3000-
integrity sha512-J9tg5uraYoQKaWbmrzDDexbG6hHnMcWS1qLYgJSWE+mpA3U5OCSeMUhb+K55otgZJ34oFdR0ECvdIb3xuO5JOQ==
3001-
30022990
loader-runner@^2.3.0:
30032991
version "2.3.0"
30042992
resolved "https://registry.yarnpkg.com/loader-runner/-/loader-runner-2.3.0.tgz#f482aea82d543e07921700d5a46ef26fdac6b8a2"

0 commit comments

Comments
 (0)