Next iteration of x-element (soon to be 1.0.0). #69
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This closes #68, closes #67, closes #66, closes #57, closes #46, closes #42, closes #36, closes #31, closes #30, closes #28, closes #26, and closes #25.
This is a clean version of #58 — that PR began as an exploration and turned into a promising candidate for our initial 1.0.0. Since the discussions got lengthy in there, I decided to start fresh with a better branch name and a clean slate.
Significant changes:
console.warn
(e.g., inherited property shadowing,data-*
attributes, etc.)observer
>>observe
is now a function (proper context is maintained if it's a constructor method).computed
>>input
+compute
.compute
is now a function.input
is an array of property names which will be resolved to arguments at runtime and passed tocompute
.value
>>initial
+default
.initial
is used if initial value is nullish.default
is used if property value is ever nullish.readOnly
is first-class.internal
is first-class..internal
proxy.compute
at the end.createRenderRoot
.observe
callbacks to bevalue, oldValue
— it was previouslyoldValue, value
.compute
,reflect
,render
, thenobserve
.compute
,listen
,observe
, etc).null
andundefined
to''
is removed, the underlying templating engine takes care of this for us.[Boolean, String, Number]
now throws a halting error (e.g., setting an attribute for a property that is oftype: Object
).