Automatic registration
This page loads the guarded definition helper from
unpkg. Importing
define.js registers the default tag
automatically. The package root and
table-modifiable.js instead export only the
class; see the
esm.sh example
for manual registration.
Importing the helper already registers the default tag; the extra call is safe for that same tag. All columns remain readable before enhancement or if loading fails. Focus the table region to scroll wider data with the arrow keys.
<script type="module">
import { defineTableModifiable } from
'https://unpkg.com/@aarongustafson/table-modifiable@latest/define.js?module';
defineTableModifiable();
</script>
<table-modifiable removable="Name,Email,Phone"
role="region" aria-label="Contact table" tabindex="0">
<table>
<caption>Contact directory</caption>
<thead><tr>
<th>Name</th><th>Email</th><th>Phone</th>
</tr></thead>
<tbody>
<tr><td>John Doe</td><td>john@example.com</td><td>555-1234</td></tr>
<tr><td>Jane Smith</td><td>jane@example.com</td><td>555-5678</td></tr>
<tr><td>Bob Johnson</td><td>bob@example.com</td><td>555-9012</td></tr>
</tbody>
</table>
</table-modifiable>
| Name | Phone | |
|---|---|---|
| John Doe | john@example.com | 555-1234 |
| Jane Smith | jane@example.com | 555-5678 |
| Bob Johnson | bob@example.com | 555-9012 |