1
0
mirror of https://github.com/jaandrle/deka-dom-el synced 2024-11-21 23:39:37 +01:00

🔤 🐛 TS comments for references

wrongly refactored in last commit
This commit is contained in:
Jan Andrle 2024-06-04 16:09:50 +02:00
parent 83ade00bf0
commit 5299a0329c
Signed by: jaandrle
GPG Key ID: B3A25AED155AFFAB
5 changed files with 46 additions and 23 deletions

View File

@ -13,27 +13,33 @@ import { code } from "./components/code.html.js";
/** @param {string} url */ /** @param {string} url */
const fileURL= url=> new URL(url, import.meta.url); const fileURL= url=> new URL(url, import.meta.url);
const references= { const references= {
mdn_create: { /** document.createElement() */ /** document.createElement() */
mdn_create: {
title: t`MDN documentation page for document.createElement()`, title: t`MDN documentation page for document.createElement()`,
href: "https://developer.mozilla.org/en-US/docs/Web/API/Document/createElement", href: "https://developer.mozilla.org/en-US/docs/Web/API/Document/createElement",
}, },
mdn_idl: { /** Interface Description Language (`el.textContent`) */ /** Interface Description Language (`el.textContent`) */
mdn_idl: {
title: t`MDN page about Interface Description Language`, title: t`MDN page about Interface Description Language`,
href: "https://developer.mozilla.org/en-US/docs/Glossary/IDL", href: "https://developer.mozilla.org/en-US/docs/Glossary/IDL",
}, },
mdn_el: { /** HTMLElement */ /** HTMLElement */
mdn_el: {
title: t`MDN documentation page for HTMLElement`, title: t`MDN documentation page for HTMLElement`,
href: "https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement" href: "https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement"
}, },
mdn_p: { /** HTMLParagraphElement */ /** HTMLParagraphElement */
mdn_p: {
title: t`MDN documentation page for HTMLParagraphElement (\`p\` tag)`, title: t`MDN documentation page for HTMLParagraphElement (\`p\` tag)`,
href: "https://developer.mozilla.org/en-US/docs/Web/API/HTMLParagraphElement" href: "https://developer.mozilla.org/en-US/docs/Web/API/HTMLParagraphElement"
}, },
mdn_destruct: { /** `[a, b] = [1, 2]` */ /** `[a, b] = [1, 2]` */
mdn_destruct: {
title: t`MDN page about destructuring assignment syntax (e.g. \`[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", href: "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Destructuring_assignment",
}, },
mdn_ns: { /** document.createElementNS() */ /** document.createElementNS() */
mdn_ns: {
title: t`MDN documentation page for document.createElementNS() (e.g. for SVG elements)`, 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", href: "https://developer.mozilla.org/en-US/docs/Web/API/Document/createElementNS",
} }

View File

@ -13,24 +13,30 @@ import { code } from "./components/code.html.js";
/** @param {string} url */ /** @param {string} url */
const fileURL= url=> new URL(url, import.meta.url); const fileURL= url=> new URL(url, import.meta.url);
const references= { const references= {
mdn_listen: { /** element.addEventListener() */ /** element.addEventListener() */
mdn_listen: {
title: t`MDN documentation page for elemetn.addEventListener`, title: t`MDN documentation page for elemetn.addEventListener`,
href: "https://developer.mozilla.org/en-US/docs/Web/API/EventTarget/addEventListener", href: "https://developer.mozilla.org/en-US/docs/Web/API/EventTarget/addEventListener",
}, },
mdn_abortListener: { /** AbortSignal+element.addEventListener */ /** AbortSignal+element.addEventListener */
mdn_abortListener: {
title: t`MDN documentation page for using AbortSignal with 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", href: "https://developer.mozilla.org/en-US/docs/Web/API/EventTarget/addEventListener#signal",
}, },
web_events: { /** comparison listening options by WebReflection */ /** comparison listening options by WebReflection */
web_events: {
href: "https://gist.github.com/WebReflection/b404c36f46371e3b1173bf5492acc944", href: "https://gist.github.com/WebReflection/b404c36f46371e3b1173bf5492acc944",
}, },
mdn_customElement: { /** Custom Element lifecycle callbacks */ /** Custom Element lifecycle callbacks */
mdn_customElement: {
href: "https://developer.mozilla.org/en-US/docs/Web/API/Web_components/Using_custom_elements#custom_element_lifecycle_callbacks" href: "https://developer.mozilla.org/en-US/docs/Web/API/Web_components/Using_custom_elements#custom_element_lifecycle_callbacks"
}, },
mdn_mutation: { /** MutationObserver */ /** MutationObserver */
mdn_mutation: {
href: "https://developer.mozilla.org/en-US/docs/Web/API/MutationObserver", href: "https://developer.mozilla.org/en-US/docs/Web/API/MutationObserver",
}, },
vue_fix: { /** Readding the element to the DOM fix by Vue */ /** Readding the element to the DOM fix by Vue */
vue_fix: {
title: t`Vue and Web Components, lifecycle implementation readding the element to the DOM`, title: t`Vue and Web Components, lifecycle implementation readding the element to the DOM`,
href: "https://vuejs.org/guide/extras/web-components.html#lifecycle", href: "https://vuejs.org/guide/extras/web-components.html#lifecycle",
} }

View File

@ -13,23 +13,28 @@ import { code } from "./components/code.html.js";
/** @param {string} url */ /** @param {string} url */
const fileURL= url=> new URL(url, import.meta.url); const fileURL= url=> new URL(url, import.meta.url);
const references= { const references= {
wiki_event_driven: { /** Event-driven programming */ /** Event-driven programming */
wiki_event_driven: {
title: t`Wikipedia: Event-driven programming`, title: t`Wikipedia: Event-driven programming`,
href: "https://en.wikipedia.org/wiki/Event-driven_programming", href: "https://en.wikipedia.org/wiki/Event-driven_programming",
}, },
wiki_pubsub: { /** Publishsubscribe pattern */ /** Publishsubscribe pattern */
wiki_pubsub: {
title: t`Wikipedia: Publishsubscribe pattern`, title: t`Wikipedia: Publishsubscribe pattern`,
href: "https://en.wikipedia.org/wiki/Publish%E2%80%93subscribe_pattern", href: "https://en.wikipedia.org/wiki/Publish%E2%80%93subscribe_pattern",
}, },
fpubsub: { /** NPM package: fpubsub */ /** NPM package: fpubsub */
fpubsub: {
title: t`NPM package: fpubsub`, title: t`NPM package: fpubsub`,
href: "https://www.npmjs.com/package/fpubsub", href: "https://www.npmjs.com/package/fpubsub",
}, },
mdn_primitive: { /** JS Primitives | MDN */ /** JS Primitives | MDN */
mdn_primitive: {
title: t`Primitive | MDN`, title: t`Primitive | MDN`,
href: "https://developer.mozilla.org/en-US/docs/Glossary/Primitive", href: "https://developer.mozilla.org/en-US/docs/Glossary/Primitive",
}, },
mdn_use_reducer: { /** useReducer */ /** useReducer */
mdn_use_reducer: {
title: t`useReducer hook | React docs`, title: t`useReducer hook | React docs`,
href: "https://react.dev/reference/react/useReducer", href: "https://react.dev/reference/react/useReducer",
} }

View File

@ -13,11 +13,13 @@ import { code } from "./components/code.html.js";
/** @param {string} url */ /** @param {string} url */
const fileURL= url=> new URL(url, import.meta.url); const fileURL= url=> new URL(url, import.meta.url);
const references= { const references= {
garbage_collection: { /** Garbage collection on MDN */ /** Garbage collection on MDN */
garbage_collection: {
title: t`MDN documentation page for Garbage collection`, title: t`MDN documentation page for Garbage collection`,
href: "https://developer.mozilla.org/en-US/docs/Glossary/Garbage_collection", href: "https://developer.mozilla.org/en-US/docs/Glossary/Garbage_collection",
}, },
signals: { /** Signals */ /** Signals */
signals: {
title: t`Signals section on this library`, title: t`Signals section on this library`,
href: "./p04-signals#h-introducing-signals", href: "./p04-signals#h-introducing-signals",
} }

View File

@ -13,19 +13,23 @@ import { code } from "./components/code.html.js";
/** @param {string} url */ /** @param {string} url */
const fileURL= url=> new URL(url, import.meta.url); const fileURL= url=> new URL(url, import.meta.url);
const references= { const references= {
mdn_web_components: { /** Web Components on MDN */ /** Web Components on MDN */
mdn_web_components: {
title: t`MDN documentation page for Web Components`, title: t`MDN documentation page for Web Components`,
href: "https://developer.mozilla.org/en-US/docs/Web/API/Web_components", href: "https://developer.mozilla.org/en-US/docs/Web/API/Web_components",
}, },
mdn_observedAttributes: { /** observedAttributes on MDN */ /** observedAttributes on MDN */
mdn_observedAttributes: {
title: t`MDN documentation page for observedAttributes`, title: t`MDN documentation page for observedAttributes`,
href: "https://developer.mozilla.org/en-US/docs/Web/API/Web_components/Using_custom_elements#responding_to_attribute_changes", href: "https://developer.mozilla.org/en-US/docs/Web/API/Web_components/Using_custom_elements#responding_to_attribute_changes",
}, },
mdn_custom_elements: { /** Custom Elements on MDN */ /** Custom Elements on MDN */
mdn_custom_elements: {
title: t`MDN documentation page for Custom Elements`, title: t`MDN documentation page for Custom Elements`,
href: "https://developer.mozilla.org/en-US/docs/Web/API/Web_components/Using_custom_elements", href: "https://developer.mozilla.org/en-US/docs/Web/API/Web_components/Using_custom_elements",
}, },
custom_elements_tips: { /** Custom Elements tips from WebReflection */ /** Custom Elements tips from WebReflection */
custom_elements_tips: {
title: t`Ideas and tips from WebReflection`, title: t`Ideas and tips from WebReflection`,
href: "https://gist.github.com/WebReflection/ec9f6687842aa385477c4afca625bbf4", href: "https://gist.github.com/WebReflection/ec9f6687842aa385477c4afca625bbf4",
} }