mirror of
https://github.com/jaandrle/deka-dom-el
synced 2025-07-01 20:32:13 +02:00
🔤 small docs refact
This commit is contained in:
@ -27,6 +27,7 @@ export function page({ pkg, info }){
|
||||
const page_id= info.id;
|
||||
return el(simplePage, { info, pkg }).append(
|
||||
el("p", t`The library tries to provide pure JavaScript tool(s) to create reactive interfaces using …`),
|
||||
|
||||
el(h3, t`Event-driven programming (3 parts separation ≡ 3PS)`),
|
||||
el("p").append(t`
|
||||
Let's introduce the basic principle on which the library is built. We'll use the JavaScript listener as
|
||||
@ -47,13 +48,15 @@ export function page({ pkg, info }){
|
||||
to use introduced 3PS pattern in our applications. As you can see it in the example above.
|
||||
`),
|
||||
el("p").append(...T`
|
||||
Also please notice that there is very similar 3PS pattern used for separate creation of UI and business logic.
|
||||
Also please notice that there is very similar 3PS pattern used for separate creation of UI and
|
||||
business logic.
|
||||
`),
|
||||
el("p").append(...T`
|
||||
The 3PS is very simplified definition of the pattern. There are more deep/academic definitions more precisely
|
||||
describe usage in specific situations, see for example ${el("a", { textContent: t`MVVM`, ...references.w_mvv })}
|
||||
or ${el("a", { textContent: t`MVC`, ...references.w_mvc })}.
|
||||
`),
|
||||
|
||||
el(h3, t`Organization of the documentation`),
|
||||
);
|
||||
}
|
||||
|
@ -13,33 +13,27 @@ import { code } from "./components/code.html.js";
|
||||
/** @param {string} url */
|
||||
const fileURL= url=> new URL(url, import.meta.url);
|
||||
const references= {
|
||||
/** document.createElement() */
|
||||
mdn_create: {
|
||||
mdn_create: { /** document.createElement() */
|
||||
title: t`MDN documentation page for document.createElement()`,
|
||||
href: "https://developer.mozilla.org/en-US/docs/Web/API/Document/createElement",
|
||||
},
|
||||
/** Interface Description Language (`el.textContent`) */
|
||||
mdn_idl: {
|
||||
mdn_idl: { /** Interface Description Language (`el.textContent`) */
|
||||
title: t`MDN page about Interface Description Language`,
|
||||
href: "https://developer.mozilla.org/en-US/docs/Glossary/IDL",
|
||||
},
|
||||
/** HTMLElement */
|
||||
mdn_el: {
|
||||
mdn_el: { /** HTMLElement */
|
||||
title: t`MDN documentation page for HTMLElement`,
|
||||
href: "https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement"
|
||||
},
|
||||
/** HTMLParagraphElement */
|
||||
mdn_p: {
|
||||
mdn_p: { /** HTMLParagraphElement */
|
||||
title: t`MDN documentation page for HTMLParagraphElement (\`p\` tag)`,
|
||||
href: "https://developer.mozilla.org/en-US/docs/Web/API/HTMLParagraphElement"
|
||||
},
|
||||
/** `[a, b] = [1, 2]` */
|
||||
mdn_destruct: {
|
||||
mdn_destruct: { /** `[a, b] = [1, 2]` */
|
||||
title: t`MDN page about destructuring assignment syntax (e.g. \`[a, b] = [1, 2]\`)`,
|
||||
href: "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Destructuring_assignment",
|
||||
},
|
||||
/** document.createElementNS() */
|
||||
mdn_ns: {
|
||||
mdn_ns: { /** document.createElementNS() */
|
||||
title: t`MDN documentation page for document.createElementNS() (e.g. for SVG elements)`,
|
||||
href: "https://developer.mozilla.org/en-US/docs/Web/API/Document/createElementNS",
|
||||
}
|
||||
|
@ -13,30 +13,24 @@ import { code } from "./components/code.html.js";
|
||||
/** @param {string} url */
|
||||
const fileURL= url=> new URL(url, import.meta.url);
|
||||
const references= {
|
||||
/** element.addEventListener() */
|
||||
mdn_listen: {
|
||||
mdn_listen: { /** element.addEventListener() */
|
||||
title: t`MDN documentation page for elemetn.addEventListener`,
|
||||
href: "https://developer.mozilla.org/en-US/docs/Web/API/EventTarget/addEventListener",
|
||||
},
|
||||
/** AbortSignal+element.addEventListener */
|
||||
mdn_abortListener: {
|
||||
mdn_abortListener: { /** AbortSignal+element.addEventListener */
|
||||
title: t`MDN documentation page for using AbortSignal with element.addEventListener`,
|
||||
href: "https://developer.mozilla.org/en-US/docs/Web/API/EventTarget/addEventListener#signal",
|
||||
},
|
||||
/** comparison listening options by WebReflection */
|
||||
web_events: {
|
||||
web_events: { /** comparison listening options by WebReflection */
|
||||
href: "https://gist.github.com/WebReflection/b404c36f46371e3b1173bf5492acc944",
|
||||
},
|
||||
/** Custom Element lifecycle callbacks */
|
||||
mdn_customElement: {
|
||||
mdn_customElement: { /** Custom Element lifecycle callbacks */
|
||||
href: "https://developer.mozilla.org/en-US/docs/Web/API/Web_components/Using_custom_elements#custom_element_lifecycle_callbacks"
|
||||
},
|
||||
/** MutationObserver */
|
||||
mdn_mutation: {
|
||||
mdn_mutation: { /** MutationObserver */
|
||||
href: "https://developer.mozilla.org/en-US/docs/Web/API/MutationObserver",
|
||||
},
|
||||
/** Readding the element to the DOM fix by Vue */
|
||||
vue_fix: {
|
||||
vue_fix: { /** Readding the element to the DOM fix by Vue */
|
||||
title: t`Vue and Web Components, lifecycle implementation readding the element to the DOM`,
|
||||
href: "https://vuejs.org/guide/extras/web-components.html#lifecycle",
|
||||
}
|
||||
|
@ -13,28 +13,23 @@ import { code } from "./components/code.html.js";
|
||||
/** @param {string} url */
|
||||
const fileURL= url=> new URL(url, import.meta.url);
|
||||
const references= {
|
||||
/** Event-driven programming */
|
||||
wiki_event_driven: {
|
||||
wiki_event_driven: { /** Event-driven programming */
|
||||
title: t`Wikipedia: Event-driven programming`,
|
||||
href: "https://en.wikipedia.org/wiki/Event-driven_programming",
|
||||
},
|
||||
/** Publish–subscribe pattern */
|
||||
wiki_pubsub: {
|
||||
wiki_pubsub: { /** Publish–subscribe pattern */
|
||||
title: t`Wikipedia: Publish–subscribe pattern`,
|
||||
href: "https://en.wikipedia.org/wiki/Publish%E2%80%93subscribe_pattern",
|
||||
},
|
||||
/** NPM package: fpubsub */
|
||||
fpubsub: {
|
||||
fpubsub: { /** NPM package: fpubsub */
|
||||
title: t`NPM package: fpubsub`,
|
||||
href: "https://www.npmjs.com/package/fpubsub",
|
||||
},
|
||||
/** JS Primitives | MDN */
|
||||
mdn_primitive: {
|
||||
mdn_primitive: { /** JS Primitives | MDN */
|
||||
title: t`Primitive | MDN`,
|
||||
href: "https://developer.mozilla.org/en-US/docs/Glossary/Primitive",
|
||||
},
|
||||
/** useReducer */
|
||||
mdn_use_reducer: {
|
||||
mdn_use_reducer: { /** useReducer */
|
||||
title: t`useReducer hook | React docs`,
|
||||
href: "https://react.dev/reference/react/useReducer",
|
||||
}
|
||||
|
@ -13,13 +13,11 @@ import { code } from "./components/code.html.js";
|
||||
/** @param {string} url */
|
||||
const fileURL= url=> new URL(url, import.meta.url);
|
||||
const references= {
|
||||
/** Garbage collection on MDN */
|
||||
garbage_collection: {
|
||||
garbage_collection: { /** Garbage collection on MDN */
|
||||
title: t`MDN documentation page for Garbage collection`,
|
||||
href: "https://developer.mozilla.org/en-US/docs/Glossary/Garbage_collection",
|
||||
},
|
||||
/** Signals */
|
||||
signals: {
|
||||
signals: { /** Signals */
|
||||
title: t`Signals section on this library`,
|
||||
href: "./p04-signals#h-introducing-signals",
|
||||
}
|
||||
|
Reference in New Issue
Block a user