Giter Club home page Giter Club logo

Comments (3)

AndyOGo avatar AndyOGo commented on May 13, 2024 1

@smalluban
Thanks for your great feedback.

I agree with you, strictly speaking constructor, define, aren't part of what are custom element's reactions.
Maybe lifecycle is a better fit, though I wanted to avoid that people start to think with React paradigms in mind and therefore used other terms by intention.

Indeed, there are many initiators for connectedCallback and disconnectedCallback, i.e. the whole DOM API - but I wanted to avoid to include the whole API.
Maybe it helps to prefix the initiators by e.g. to clarify that this is only one possibility?
Tracked here AndyOGo/custom-element-reactions-diagram#23

The purpose is to increase awareness and understanding of custom elements, to help people find relevant parts in the spec and actually study them carefully.

from hybrids.

AndyOGo avatar AndyOGo commented on May 13, 2024 1

@smalluban
Done, Thanks a lot.
I have added two examples of the DOM API being marked as [CEReactions] extended IDL attribute.

https://andyogo.github.io/custom-element-reactions-diagram/

from hybrids.

smalluban avatar smalluban commented on May 13, 2024

Overall it is done quite well. I am not sure of the purpose, but I have some highlights:

  • define is not one of the element reactions, a complete list is described in the specs here, so I think this "Unknown phase" is not needed here.
  • connectedCallback/disconnectedCallback is also called when an element is moved from one place to another. I know, that in that process an element is disconnected, but your diagram and explanation suggests, that it works more like React components, which only calls unmount when the component is going to be destroyed.

from hybrids.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.