[Bug 22827] New: [Custom]: Confusing condition on documents and registration contexts in constructor invocation

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

            Bug ID: 22827
           Summary: [Custom]: Confusing condition on documents and
                    registration contexts in constructor invocation
    Classification: Unclassified
           Product: WebAppsWG
           Version: unspecified
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Component Model
          Assignee: dglazkov@chromium.org
          Reporter: dominicc@chromium.org
        QA Contact: public-webapps-bugzilla@w3.org
            Blocks: 14968

The constructor generation algorithm says

"DOCUMENT [is] the owner document for new custom element"

Then

"Let CONTEXT be the registration context of DOCUMENT"

and later

"If the registration context of ELEMENT's document is different from CONTEXT,
throw an InvalidStateError and stop."

It is not clear to me how this error could arise, since the owner document for
the new custom element's registration context is by definition the registration
context of element's document.

I think it would be simpler if generated constructors worked like the image
constructor does, which is:

"The element's document must be the active document of the browsing context of
the Window object on which the interface object of the invoked constructor is
found."

This won't exactly work, because the generated constructor is not defined on a
Window object per se. But something like this would make the implementation
better--as it is, we have to keep the document the definition was registered
against alive just to own elements until they can be adopted into their
ultimate destination.

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

Received on Monday, 29 July 2013 04:58:24 UTC