The point of the internal properties are to specifically not participate in the public element interface. I.e., element.title should have nothing to do with element.internal.title. This is usually benign, but can cause problems if the related public property has restrictions on how it’s meant to be used. For example, the following will fail if you register it and try to print it in the DOM:
class InternalExample extends XElement {
static get properties() {
return { children: { internal: true } }; // The "children" property is _read only_ on the public interface.
}
}
// TypeError: Cannot set property children of #<Element> which has only a getter
Proposal
Simply don’t perform a lookup on the public interface for internal properties. This is the intended behavior, but there’s just no guard yet.
The point of the
internal
properties are to specifically not participate in the public element interface. I.e.,element.title
should have nothing to do withelement.internal.title
. This is usually benign, but can cause problems if the related public property has restrictions on how it’s meant to be used. For example, the following will fail if you register it and try to print it in the DOM:Proposal
Simply don’t perform a lookup on the public interface for internal properties. This is the intended behavior, but there’s just no guard yet.