Skip to content

The definitions of slot and slot elements are unclear #306

Closed

Description

@rniwa

A slot is a defined location where nodes in a different node tree appear instead of the nodes's original position when constructing a composed tree.

There are several undefined terms used in this sentence such as "appear" and "original position". How something like this?

A slot is a defined location in a shadow tree into which some of its shadow host's children are inserted as children in its composed tree.

Also, the sentence below the digram says:

The slot element that satisfies all of the following conditions represents a slot:

while the sentence in the slot element says:

The slot element represents a slot in the shadow tree.

These two normative statements contradict one another, and I'm not certain what "represents" mean in this context. I think it's better to say that the slot element that satisfies the two conditions will define a slot at the "location" of the element. I think there's DOM4 way of saying a location though. Whatever term we use for "location" should also be defined either in shadow DOM spec or DOM4 spec.

Activity

  1. hayatoito commented on Sep 2, 2015

    @hayatoito
    Contributor

    I agree and thank you for the suggestions.
    Some of the sentences have been there for years, which were used to define an "insertion point".

    Let me try to polish that.

  2. hayatoito commented on Sep 2, 2015

    @hayatoito
    Contributor

    I've updated the spec, however, I'm still wondering how to define the location.
    I welcome any idea to make it more clear.

  3. rniwa commented on Sep 2, 2015

    @rniwa
    CollaboratorAuthor

    As I mention in the issue #308, a slot needs to be either a node or (node, offset) / (node, precedingSibling) / (node, succeedingSibling) pair like a boundary point. There are basically only two options we've got.

  4. reopened this on Sep 2, 2015
  5. hayatoito commented on Sep 3, 2015

    @hayatoito
    Contributor

    Okay. However, I don't think this is a blocking issue for us to start to implement v1. Let me remove v1 label from this so that we can focus on a higher priority issue for v1.

    If you think a slot should not be a node and should be (node, offset) / (node, precedingSibling) / (node, succeedingSibling), please feel free to label this issue with v1. That's a huge change.

  6. rniwa commented on Sep 3, 2015

    @rniwa
    CollaboratorAuthor

    This is definitely required for v1. Without a clear understanding of what "slot" is, nothing could be implemented.

  7. hayatoito commented on Sep 3, 2015

    @hayatoito
    Contributor

    Okay. However, I'm wondering what action items are remaining to us.

    I can't read what wording are the best to define slots from the proposal.
    https://github.com/w3c/webcomponents/blob/gh-pages/proposals/Slots-Proposal.md

    It looks the proposal defines a slot as:

    slot -- a defined location in a shadow tree. Represented by the slot element.

    Do you have any suggestion other than that?

  8. rniwa commented on Sep 4, 2015

    @rniwa
    CollaboratorAuthor

    I think slot should be an element. Since we already have a slot element, we might want to instead define a flag on the slot element like "valid slot" or "used slot" instead.

  9. added a commit that references this issue on Sep 7, 2015
    677cd90
  10. plwalters commented on Sep 26, 2015

    @plwalters

    Considered a more descriptive name such as template slot or content slot to help define what a slot actually is or what purpose it serves?

  11. added 2 commits that reference this issue on Jul 30, 2025
    51902e3
    8ca1ee2
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