2
3
Fork
You've already forked webtt
0
A specification for displaying cross-domain tooltips, without server-side logic. https://worm-blossom.org/webtt.html
  • TypeScript 85.5%
  • HTML 14.5%
2025年12月11日 18:34:10 +01:00
testing Fix test example 2025年09月28日 15:40:20 +02:00
build.ts Draft everything 2025年09月28日 15:21:17 +02:00
deno.json Draft everything 2025年09月28日 15:21:17 +02:00
deno.lock Draft everything 2025年09月28日 15:21:17 +02:00
deps.ts Draft everything 2025年09月28日 15:21:17 +02:00
LICENSE Draft everything 2025年09月28日 15:21:17 +02:00
mod.ts Draft everything 2025年09月28日 15:21:17 +02:00
README.md Prepare for release 2025年12月11日 18:34:10 +01:00
typeCheck.ts Draft everything 2025年09月28日 15:21:17 +02:00
webtt.js Fix test example 2025年09月28日 15:40:20 +02:00

WebTT Implementation

An implementation of client-side javascript for WebTT (Web Tooltips), a specification for nestable, cross-domain tooltips without any server-side logic.

Instructions

This repository provides a minified javascript file you can simply include in your tooltip pages and host pages: webtt.js.

To compile the typescript source, run deno task build (requires the deno javascript runtime, but you can probably figure out your own preferred way of comiling typescript as well).

Styling

This implementation places tooltip iframes as the sole children of divs of class tooltipContainer. Such divs should be styled to be positioned absolutely (.tooltipContainer { position: absolute; }), because we position them by adding dynamically computed left and top styles to these divs. The iframe itself is given a style="height: 123px; style (where 123px is replaced with an appropriate height automatically).

200 milliseconds before a tooltip is fully removed, we apply the tooltipFadeout class to its tooltipContainer.

When spawning a tooltip for an anchor with a data attribute data-tooltip-class="some classes", these classes are added to the tooltipContainer div.