Re: [webcomponents] Rewrite Custom Element Construction Algorithm (#403)

This overall LGTM. Thanks a lot for doing the work. Minor comments below:

---
> custom element interface,

Nit: I'd make this "custom element constructor".

> ERROR, could be either "None", "NotFound", "InvalidStateError", or an ECMAScript exception.

We'll need to remember to handle these while parsing.

> Invoke the [[Construct]] internal method [3] on custom element interface of DEFINITION.

This isn't quite right. You want to do Construct(custom element constructor), using https://tc39.github.io/ecma262/#sec-construct

> Let TARGET be GetNewTarget(). [4]

You can't use GetNewTarget() inside engine code I believe. The ES spec always instead just references NewTarget, e.g. https://tc39.github.io/ecma262/#sec-object-value

Same for GetGlobalObject(). You'll need to use entry settings object's global object or something like that.

> local name set to NAME

set to DEFINITION's name, presumably
---

I'd like to take point on incorporating this into the spec since I can do the minor tweaks necessary to make this conform to ES style (which I think is probably necessary for such low-level operations). I'll work on a PR.

---
Reply to this email directly or view it on GitHub:
https://github.com/w3c/webcomponents/issues/403#issuecomment-190815076

Received on Tuesday, 1 March 2016 17:03:13 UTC