Skip to content

Conversation

@theengineear
Copy link
Collaborator

The ability to override templateEngine and use alternative rendering engines has been removed. The x-element class now uses x-template exclusively, which simplifies the codebase and reduces surface area.

Changes:

  • Removes defaultTemplateEngine and templateEngine static getters.
  • Updates template() method signature to remove engine parameter.
  • Imports html and render directly from x-template.
  • Removes related demos.
  • Updates documentation to remove customization examples.
  • Removes related tests.

Closes #337.

@@ -1,4 +1,4 @@
import * as defaultTemplateEngine from './x-template.js';
import { html, render } from './x-template.js';
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No need to import as defaultTemplateEngine anymore — there is no confusion. We always mean our internal html and render when we are referencing it.

* @param {{[key: string]: (...args: unknown[]) => unknown}} engine
* @returns {templateCallback}
*/
static template(html, engine) { // eslint-disable-line no-unused-vars
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is probably the highlight of the change. The default template engine doesn’t have special directives anymore and now that you cannot plug in other engines — we can remove this parameter entirely. This seems small, but it’s an important reduction in surface area.

The ability to override `templateEngine` and use alternative rendering
engines has been removed. The `x-element` class now uses `x-template`
exclusively, which simplifies the codebase and reduces surface area.

Changes:
- Removes `defaultTemplateEngine` and `templateEngine` static getters.
- Updates `template()` method signature to remove `engine` parameter.
- Imports `html` and `render` directly from `x-template`.
- Removes related demos.
- Updates documentation to remove customization examples.
- Removes related tests.

Closes #337.
@theengineear theengineear force-pushed the remove-custom-template-engine branch from c48b445 to c1a0281 Compare December 3, 2025 18:29
@theengineear
Copy link
Collaborator Author

@klebba — Gonna get this merged in and will update #314.

@theengineear theengineear merged commit ffbb0d8 into main Dec 4, 2025
1 check passed
@theengineear theengineear deleted the remove-custom-template-engine branch December 4, 2025 08:50
@klebba
Copy link
Contributor

klebba commented Dec 6, 2025

NOICE

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Remove support for custom template engines.

3 participants