forked from webcomponents/gold-standard
-
Notifications
You must be signed in to change notification settings - Fork 0
Child Independence
Jan Miksovsky edited this page May 13, 2015
·
1 revision
Can you use the component with a wide range of child element types?
[This article is a stub, and is not yet complete.]
It’s fine for a component to treat certain types of children specially (e.g., a
<select> treats <optgroup> children differently than <option> children),
but if a component treats all its children in the same general way, it’s
preferable if children can be of any element type. Keep in mind that components
can be subclassed, so avoid expressing an expectation that a child will always
have a particular tag. (See Subclassing.)