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: [email protected]
Reporter: [email protected]
QA Contact: [email protected]
CC: [email protected], [email protected]
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.