derived-cms 0.6.1

Generate a CMS, complete with admin interface, headless API and database interface from Rust type definitions. Works in cunjunction with serde and ormlite and uses axum as a web server.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
/**
 * evaluate the string attribute `onmount` on all children. Stop recusion if `onmount` evaluates to `true`.
 * @param {HTMLElement} e
 */
async function callOnMountRecursive(e) {
  const AsyncFunction = Object.getPrototypeOf(async function () {}).constructor;
  for (const c of e.children) {
    try {
      const a = c.getAttribute("onmount");
      if (!a || !(await new AsyncFunction(a).call(c))) {
        await callOnMountRecursive(c);
      }
    } catch (err) {
      console.error(err, e, c);
    }
  }
}