- From: Hayato Ito <notifications@github.com>
- Date: Mon, 06 Jul 2015 00:38:51 -0700
- To: w3c/webcomponents <webcomponents@noreply.github.com>
- Message-ID: <w3c/webcomponents/issues/201@github.com>
Title: [Custom]: Add the possibility to extend the custom element (bugzilla: 26583)
Migrated from: https://www.w3.org/Bugs/Public/show_bug.cgi?id=26583
----
comment: 0
comment_url: https://www.w3.org/Bugs/Public/show_bug.cgi?id=26583#c0
** wrote on 2014-08-14 08:41:54 +0000.
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").
----
comment: 1
comment_url: https://www.w3.org/Bugs/Public/show_bug.cgi?id=26583#c1
*Tab Atkins Jr.* wrote on 2014-08-14 14:57:20 +0000.
There is no "non-dashed version" of a name, because there's no common structure to the name that we can safely ignore. The sole requirements it that a dash appears *somewhere* in the name, so it can occur between or around significant or insignificant parts, and there's no way to tell automatically what parts are insignificant.
---
Reply to this email directly or view it on GitHub:
https://github.com/w3c/webcomponents/issues/201
Received on Monday, 6 July 2015 07:39:36 UTC