-
Notifications
You must be signed in to change notification settings - Fork 2.5k
Description
Mixins are bits of API that are defined once and implemented by several interfaces.
E.g. (fictive)
Mixin.method1
Mixin.method2
Interface1 implements Mixin means:
Interface1.method1 and Interface1.method2 are implemented.
Interface2 implements Mixin means:
Interface2.method2 and Interface2.method2 are implemented.
This is used in spec to describe once methods/properties that are implemented by several interfaces.
Mixins are invisible to the users, and different interfaces can implement these methods at different moment, completely and incompletely, and with different bugs or limitations. Mixins are transparent to the user.
Mixins can go away or be added in the spec, without having an impact on the developer using them.
MDN shows mixins only to avoid duplication (or triplication) of articles [and the nightmare of keeping them coherent]. Mixins are blended in the interface they appear like a regular property or method in the sidebar and in the list in the main text.
How to represent them?