@labir/embed
Index

Webcomponents

We are currently working on webcomponents integration using Lit (opens in a new tab). The work is very much in progress.

Example

A single image app what shall be embedded in any Wordpress, Moodle or other LMS.

<thermal-file-app url="/tucnaci_04.lrc"></thermal-file-app>

Aim

In order to use thermal imaging in Wordpress, Moodle and other old-fashioned tools, we need a "Youtube-like" way of embedding. We chose webcomponents for that purpose.

The entire internal structure of @labir/core is being implemented to webcomponents wich allows:

  • to construct the entire app hierarchy using custom HTML elements
  • to dynamically set parameters such as temperature scale or palette using setAttribute

So far, we provide these elements:

  • <thermal-manager>
  • <thermal-registry>
  • <thermal-group>
  • <thermal-file>

Main challenges:

  • handle dependency injection using Lit's context mechanism
  • handle dynamic loading of images caused by DOM manipulation

Source code

See our github (opens in a new tab) for ongoing progress.