You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
In general I do think it's a bit weird that type extensions rely on a lot of the same constraints and infrastructure as custom tags, when there's no real reason to do so. E.g. maybe in my ideal world you'd have customElements.define("custom-tag", CustomTag) and customElements.defineExtension("button", "plastic", PlasticButton), instead of lumping them both together with customElements.define("custom-name", CustomTag, { extends: "button" }). But I'm not sure it's worth the churn. Especially since there's a weak argument that the hyphen encourages namespacing, anyway.
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
}
}
})
})
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.
The text was updated successfully, but these errors were encountered: