This 2-part class will be a soup-to-nuts explanation of widget design, a description the Factory pattern, a recapitulation of Event Bubbling strategy, and generic concepts for creating and mixing design patterns.

The id parameter variable of getById does not change; it will
always be present in any generic Factory.
The parts of the Factory that vary are: The additional zero or more arguments (varargs,
this case, x),
and the context, or thisArg.

Resolving the context arg is easy.

If I can solve passing varargs to a constructor in a generic context,
it will be possible to create a generic FactoryAspect.

A way to call new with variable arguments would solve this problem.
A new + apply() would provide the varargs functionality of apply,
but passed to [[Construct]], not [[Call]]. (see Function.prototype.apply, [[Call]]).

This getById method used with ElementWrapper (above)
or any other constructor that acts as a Decorator to an element and
accepts the element's id as its first argument. All other arguments will be passed to the constructor using newApply.

Another closely related technique is Decorator that accepts an element instead
of an element's id. This is covered by getByNode.

In most patterns, encapsulating the parts that vary entails creating an class.
However, in JavaScript, this Factory pattern was simple to implement by using just
two functions (getById) and leveraging the dynamic nature of
JavaScript.