[4.0] Remove dependency on Polymer library
Closed this issue · 0 comments
t2ym commented
[4.0] Remove dependency on Polymer library
Status
- Part of t2ym/i18n-element#63
- WIP in 4.0-develop branch
- NPM package
npm install i18n-format@next
ornpm install i18n-format@4.0.0-pre.13
- Depends on
i18n-number@4.0.0-pre
,wc-putty@0.1.0
,lit-html@^1.0.0
,make-plural@^4.3.0
- Depends on
Tasks
- Move
@polymer/polymer
from dependencies to devDependencies - Drop Safari 9 support
-
bower.json
withBSD-2-Clause
aslicense
- Add
lit-html
dependency - Convert to
lit-html
rendering- Remove
@polymer/polymer
imports - Convert properties and observers
- Remove
- Make these properties read-only
-
paramAttribute
isslot
-
paramFormat
is{n}
-
observeParams
istrue
- Dummy setter for
observeParams
- Dummy setter for
-
- Support IE11 and Edge with custom elements v1 polyfill
- Import a separate
polyfill.js
from an independent npm module forpolyfill.js
- Import npm package
wc-putty
- Import npm package
- Import a separate
- Convert tests
- No Polymer methods
- Adjust some waits
- Convert demo
- Remove
intl
fromextraDependencies
inpolymer.json
- Remove
- Documentation
- Decent comments
- API Docs page
Design Issues
-
root
property forshadowRoot
to imitate a Polymer element - Is
importMeta
property necessary? No
Issues
-
document.createElement('i18n-format')
fails with "The result must not have attributes"- Fix: Put off setting
this.lang
in the constructor toconnectedCallback()
- Fix: Put off setting
- Calling of
_setupParams()
is too early to collect the expected parameters in the local DOM- Fix: Put off
this._setupParams()
toconnectedCallback()
- Fix: Put off
- ShadyDOM misinterprets target of direct
node.appendChild()
asshadowRoot
- Root Cause: If
shadowRoot
is attached, ShadyDOM unexpectedly performsappendChild()
toshadowRoot
instead of the node's local DOM - Fix: Put off
attachShadow()
to the first rendering
- Root Cause: If