"…this is actually one of the two differences. The another one is that ",el("code","on"),
" accepts only object as the ",el("code","options")," (but it is still optional)."
),
el("p",{className:"notice"}).append(
"The other difference is that there is ",el("strong","no")," ",el("code","off")," function.",
" ",
"You can remove listener declaratively using ",el("a",{textContent:"AbortSignal",href:"https://developer.mozilla.org/en-US/docs/Web/API/EventTarget/addEventListener#signal",title:"part of addEventListener on MDN"}),
"To study difference, you can read a nice summary here: ",el("a",{href:"https://gist.github.com/WebReflection/b404c36f46371e3b1173bf5492acc944",textContent:"GIST @WebReflection/web_events.md"}),"."
"For Custom elements, we will later introduce a way to replace ",el("code","*Callback"),
" syntax with ",el("code","dde:*")," events. The ",el("code","on.*")," functions then",
" listen to the appropriate Custom Elements events (see ",el("a",{textContent:"Custom element lifecycle callbacks | MDN",href:"https://developer.mozilla.org/en-US/docs/Web/API/Web_components/Using_custom_elements#custom_element_lifecycle_callbacks"}),")."
),
el("p").append(
"But, in case of regular elemnets the ",el("a",{href:"https://developer.mozilla.org/en-US/docs/Web/API/MutationObserver"}).append(el("code","MutationObserver")," | MDN"),
" is internaly used to track these events. Therefore, there are some drawbacks:",
),
el("ul").append(
el("li").append(
"To proper listener registration, you need to use ",el("code","on.*")," not `on(\"dde:*\", …)`!"
"To provide intuitive behaviour, similar also to how the life-cycle events works in other",
" frameworks/libraries, deka-dom-el library ensures that ",el("code","on.connected"),
" and ",el("code","on.disconnected")," are called only once and only when the element",
" is (dis)connected to live DOM. The solution is inspired by ",el("a",{textContent:"Vue",href:"https://vuejs.org/guide/extras/web-components.html#lifecycle",title:"Vue and Web Components | Lifecycle"}),".",
" For using native behaviour re-(dis)connecting element, use:"