This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 22589 - document.register() signature in intro doesn't match spec
Summary: document.register() signature in intro doesn't match spec
Status: RESOLVED FIXED
Alias: None
Product: WebAppsWG
Classification: Unclassified
Component: HISTORICAL - Component Model (show other bugs)
Version: unspecified
Hardware: PC All
: P2 normal
Target Milestone: ---
Assignee: Dominic Cooney
QA Contact: public-webapps-bugzilla
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 14949
  Show dependency treegraph
 
Reported: 2013-07-07 23:44 UTC by Bill Keese
Modified: 2013-07-09 01:37 UTC (History)
1 user (show)

See Also:


Attachments

Description Bill Keese 2013-07-07 23:44:52 UTC
http://www.w3.org/TR/2013/WD-components-intro-20130606/ (the latest version) lists the document.register() signature for extensions with three arguments:

var FancyButton = document.register('button', 'fancy-button', {prototype: p});

However in the spec at https://dvcs.w3.org/hg/webcomponents/raw-file/tip/spec/custom/index.html#dfn-type-extension it's listed with two arguments:

document.register('x-foo', {
    prototype: Object.create(HTMLParagraphElement.prototype, {
        firstMember: {
            get: function() { return "foo"; },
            enumerable: true,
            configurable: true
        },
        // specify more members for your prototype.
        // ...
    })
});


Since Polymer also works with two arguments, I'm guessing the example in the into is wrong.
Comment 1 Dominic Cooney 2013-07-08 00:46:48 UTC
Thank you for the bug report! Fixed: <https://dvcs.w3.org/hg/webcomponents/rev/b3bb5cb82773>