T B H P N

Custom HTML Controls

"We've seen the enemy and he is us."
- Pogo, by Walt Kelly

Context:

We are concerned, here, with web page constructs that are built from HTML, CSS, and JavaScript, and can be used in a manner very similar to the built-in HTML controls. However, we want them to encapsulate views and behaviors that are application specific. In particular, we want them to function as UserControls:
UserControl:
A container for other, already existing controls, that provides a JavaScript interface for managing its contained parts programmatically.
Here's some motivating views:
We want to build web controls, similar to WPF and Asp.Net UserControls, but we want to apply them to static pages that may not run in an Asp.Net environment, so we will use only HTML, JavaScript, and CSS, no C# and no .Net web models. There are two ways to accomplish that: This part needs code examples. Come back later.
  1. Classic HTML, JavaScript, and CSS
    The first reference shows one way to do that.
    The remaining references provide details for HTML, JavaScript, and CSS.

    References:

  2. New Web Components standard

    Web Components References: