W3C home > Mailing lists > Public > public-webapps@w3.org > July to September 2014

[Bug 26583] New: [Custom]: Add the possibility to extend the custom element

From: <bugzilla@jessica.w3.org>
Date: Thu, 14 Aug 2014 08:41:54 +0000
To: public-webapps@w3.org
Message-ID: <bug-26583-2927@http.www.w3.org/Bugs/Public/>
https://www.w3.org/Bugs/Public/show_bug.cgi?id=26583

            Bug ID: 26583
           Summary: [Custom]: Add the possibility to extend the custom
                    element
           Product: WebAppsWG
           Version: unspecified
          Hardware: PC
                OS: Windows NT
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Component Model
          Assignee: dglazkov@chromium.org
          Reporter: lohentertainment@gmail.com
        QA Contact: public-webapps-bugzilla@w3.org
                CC: mike@w3.org, public-webapps@w3.org

Example:

var Modal = document.registerElement('x-modal', {
  prototype: Object.create(HTMLElement, {/* modal generic prototype */})
})
var WebcamModal = document.registerElement('x-webcam', {
  extends: 'x-modal',
  prototype: Object.create(Modal, {
    /* webcam modal specific prototype */
    show: {
        value: function() {
          Modal.prototype.show.call(this)
          // run webcam
        }
    }
  })
})

<x-modal></x-modal>
<x-modal is="webcam"></x-modal>

And will be cool if will be possible to have a non-dashed name of extend name
(is="webcam" instead is="x-webcam").

-- 
You are receiving this mail because:
You are on the CC list for the bug.
Received on Thursday, 14 August 2014 08:42:03 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 18:14:26 UTC