Documented HTML hooks for JavaScript plugin authors
See original GitHub issueIn #981 I added data-column=
attributes to the <th>
on the table page. These should become part of Datasette’s documented API so JavaScript plugin authors can use them to derive things about the tables shown on a page (`datasette-cluster-map uses them as-of https://github.com/simonw/datasette-cluster-map/issues/18).
Issue Analytics
- State:
- Created 3 years ago
- Comments:7 (7 by maintainers)
Top Results From Across the Web
Using JavaScript Hooks | Official ShopWP Plugin ...
ShopWP provides many different types of JavaScript hooks allowing you to customize various parts of the product and collection layout.
Read more >JavaScript Hooks - Advanced Woo Search
JavaScript Hooks. Description of available plugin JavaScript actions and filters. Home · Documentation · Developers; JavaScript Hooks.
Read more >backend_prod_layout — Shop-Script plugin hooks ... - Developers
DOCTYPE>, <HTML>, <HEAD>, and <BODY>. In this hook's handler, it is convenient to add plugin's CSS and JavaScript files using methods addCss() and...
Read more >JavaScript Plugin Development and API - Gerrit Code Review
Gerrit provides a simple way for accessing the DOM via DOM hooks API. A DOM hook is a custom element that is instantiated...
Read more >wordpress/hooks | Block Editor Handbook
In non-minified builds developers can register a filter or action that will be called on all hooks, for example: addAction( 'all', 'namespace', callbackFunction...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
In terms of “places to put your plugin content”, the simplest solution I can think of is something like this:
Alternative designs:
I think the original option - an empty
<div>
with a knownid
attribute - is the right one to go with here. It’s the simplest, it’s very easy for custom template authors to understand and it acknowledges that plugins may have all kinds of extra crazy stuff they want to do - like checking in that div to see if another plugin has written to it already, for example.This is joined with #1191 now, which I’ve bumped from 0.54.