Invoking elements by using only HTML: A first look at invokers | utilitybend

Wouldn’t it be cool if we could click on a button to open a modal with just HTML? How about those file input elements? Imagine that creating a custom play button for video controls would be an easy thing to do. How about custom counter buttons for a number input? This is where the idea of invokers comes in. It’s currently available behind a flag to play around with and it’s definitely one of the most exciting advances in HTML to look out for.

Source: Invoking elements by using only HTML: A first look at invokers | utilitybend

The early days of the web saw a flourishing of content, in no small part because creating that content for the Web was relatively straightforward (certainly as compared with developing apps for platforms like the Mac and Windows which I also did at the time).

And part of that relative simplicity was the declarative nature of developing for the Web.

Briefly, imperative programming is in essence telling a computer how to do something, declarative programming is telling a computer what to do.

HTML is telling a computer what things are (headings, paragraphs and so on). CSS is about telling a computer what different thing should look like.

When JavaScript came along, the difference between this declarative model for content and the imperative model for behaviour was a significant jump. Over time the Web platform has absorbed quite a what we have had to imperatively program, a significant example is the animation of web content.

But the dream of being able to declaratively program more complex interactions is a long standing one.

We’ve seen it addressed in one specific area, with <popover> elements, but it is being addressed more broadly by a relatively new technology, invokers (first introduced with <popover>).

This is a great introduction to what I think will be a significant addition to the platform.