W3C home > Mailing lists > Public > public-webapps-bugzilla@w3.org > August 2012

[Bug 18596] New: [Custom]: Use a "has a" relationship instead of "is a" for custom types

From: <bugzilla@jessica.w3.org>
Date: Thu, 16 Aug 2012 16:37:32 +0000
To: public-webapps-bugzilla@w3.org
Message-ID: <bug-18596-2532@http.www.w3.org/Bugs/Public/>

           Summary: [Custom]: Use a "has a" relationship instead of "is a"
                    for custom types
           Product: WebAppsWG
           Version: unspecified
          Platform: PC
        OS/Version: Windows NT
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Component Model
        AssignedTo: dglazkov@chromium.org
        ReportedBy: tross@microsoft.com
         QAContact: public-webapps-bugzilla@w3.org

Perhaps this has been discussed before, but I think we could simplify custom
elements significantly by creating a 'custom' property (or some similar name)
on HTMLElement. This property would hold the instance of the created custom
element type (and return null until the custom type was bound).

E.g. instead of:


You get:


This has a number of effects:

1. The concept of "upgrading" an element to a custom element no longer requires
mutating the DOM tree or the prototype chain. 

2. Makes it obvious whether or not a custom type has been bound (just check if
elm.custom is truthy).

3. Eliminates the risk of custom APIs masking future, standardized DOM APIs.

4. Clearly indicates to the consumer of a component which APIs are custom vs.

Configure bugmail: https://www.w3.org/Bugs/Public/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
Received on Thursday, 16 August 2012 16:37:33 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 7 January 2015 15:04:25 UTC