[Bug 24018] New: [Custom]: No way to pass parameters to constructor

https://www.w3.org/Bugs/Public/show_bug.cgi?id=24018

            Bug ID: 24018
           Summary: [Custom]: No way to pass parameters to constructor
           Product: WebAppsWG
           Version: unspecified
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Component Model
          Assignee: dglazkov@chromium.org
          Reporter: arv@chromium.org
        QA Contact: public-webapps-bugzilla@w3.org
            Blocks: 14968

DOM has a bunch of element constructors that take parameters. `new Image(src)`
for example. Custom elements fail in this regard. The following should just
work.

```js
class MyElement extends HTMLElement {
  constructor(text) {
    this.textContent = text;
  }
}
MyElement = document.register('my-element', MyElement);
new MyElement('Hi');
```

-- 
You are receiving this mail because:
You are the QA Contact for the bug.

Received on Friday, 6 December 2013 15:41:13 UTC