Skip to content

Shadow: define slotchange event - #229

Merged
annevk merged 6 commits into
masterfrom
slotchange
Apr 19, 2016
Merged

annevk merged 6 commits into
masterfrom
slotchange

Conversation

@annevk

@annevk annevk commented Apr 18, 2016

Copy link
Copy Markdown
Member

Fixes WICG/webcomponents#288.

This defines the slotchange event in response to remove/insert
operations, changes to a slot’s name attribute, and changes to an
element’s slot attribute.

This also introduces the assigned nodes concept for slots, and assigned
slot concept for slotables.

Slotables now also have a name, rather than a “get name”.

The slotchange event dispatches just after mutation observers.

Fixes WICG/webcomponents#288.

This defines the slotchange event in response to remove/insert
operations, changes to a slot’s name attribute, and changes to an
element’s slot attribute.

This also introduces the assigned nodes concept for slots, and assigned
slot concept for slotables.

Slotables now also have a name, rather than a “get name”.

The slotchange event dispatches just after mutation observers.
@annevk

annevk commented Apr 18, 2016

Copy link
Copy Markdown
Member Author

Things I'm not happy with:

  • The pattern "Let x be y" and then "If x is non-null, signal for x, assign for x" could be a thing
  • "assign slotables for a tree" does signal, but "assign slotables" does not

These also seem related. The call for "signal a slot change" should probably move into "assign slotables" somehow.

@annevk

annevk commented Apr 18, 2016

Copy link
Copy Markdown
Member Author

I am now reasonably happy.

@hayatoito

Copy link
Copy Markdown
Member

Looks good to me. Awesome work!
Let me provide implementor feedback later, hoping we can find a bug.

One nitpick:

  • When inserting a slot, we set a suppress signaling flag.
  • When removing a slot, we do not set a suppress signaling flag

I guess that's unintentional.

BTW, you added me to dom repository, but it looks I can not merge this PR.

@annevk

annevk commented Apr 19, 2016

Copy link
Copy Markdown
Member Author

I wasn't sure whether removing should suppress events, I will add that.

As for the repository, you should now be able to create branches on this repository and update them. As well as assign and modify issues, etc. The master branch is a bit more controlled since it affects our publication process. Hope that's acceptable.

@hayatoito

Copy link
Copy Markdown
Member

I wasn't sure whether removing should suppress events, I will add that.

Neither nor I. I have no idea which is better. For now, suppressing sounds natural. I might give feedback later when I get something.

As for the repository, you should now be able to create branches on this repository and update them. As well as assign and modify issues, etc. The master branch is a bit more controlled since it affects our publication process. Hope that's acceptable.

I am fine. Thank you for the explanation!

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

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants