Skip to content

When does the base element queue matter? #457

Closed

Description

@domenic

@dglazkov @coonsta, could use your help here. Maybe @rniwa has also run into this while implementing.

I can't think of a situation in which the current element queue = the base element queue. I think maybe in the past that would be true during initial HTML parsing, but since we moved to synchronous construction during parsing that should no longer be the case.

Are there other cases that I am missing? It seems quite possible.

Activity

  1. dglazkov commented on Mar 24, 2016

    @dglazkov
    Contributor

    Base element queue is necessary when you have async parsing/construction. It's probably not necessary in the v1 world.

  2. domenic commented on Mar 24, 2016

    @domenic
    CollaboratorAuthor

    That is truly great news. Thanks @dglazkov!

  3. annevk commented on Mar 25, 2016

    @annevk
    Collaborator

    Don't we have "async" parsing with innerHTML?

  4. domenic commented on Mar 25, 2016

    @domenic
    CollaboratorAuthor

    Sure, but in that case the element queue is the one created when entering the innerHTML setter.

  5. annevk commented on Mar 25, 2016

    @annevk
    Collaborator

    I was thinking about .innerHTML = "<base href=/x/><custom-x href=...></a><base href=/y/><custom y href=..>" but I might be missing something.

  6. domenic commented on Mar 25, 2016

    @domenic
    CollaboratorAuthor

    Yes. In that case an element queue is pushed onto the stack when you enter the innerHTML setter. When you exit the innerHTML setter, the current element queue popped is the one you just pushed, and that is the one that gets executed.

  7. annevk commented on Mar 25, 2016

    @annevk
    Collaborator

    The base element queue is not for pretending there is a different base URL for each element while we invoke its constructor and attribute callbacks?

  8. domenic commented on Mar 25, 2016

    @domenic
    CollaboratorAuthor

    The base element queue has nothing to do with base URL... are you assuming that it did just based on the presence of the word "base"?

  9. domenic commented on Mar 25, 2016

    @domenic
    CollaboratorAuthor

    It was a base (element queue), not a (base element) queue. It was the bottommost element queue in the stack of element queues (i.e. at the base of the stack).

  10. annevk commented on Mar 25, 2016

    @annevk
    Collaborator

    I was assuming that. Sorry. I do now wonder what happens in those scenarios, but I guess I can test at some point.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions