<tag>
The portable port-able part of the web for the whole wide world
Tag provides a unified approach for
Hello World is a common program to write when first learning something new. The code below imports tag.js
, creates a custom tag, and sets the content to 'Hello World!'
import tag from 'https://deno.land/x/tag' tag('hello-world').draw(() => 'Hello World!')
Tip! View the source of the example page to see <hello-world> in action!
const $ = tag(selector: string [, state: object]) : object
Creates an custom, scoped HTML tag. Requires a selector: a CSS selector. An optional second argument may be passed for seeding the initial state.
It will return an object with the selector as an attribute and the following namespaced functions.
$.draw(function(target: EventTarget))
$.flair(stylesheet: string)
$.when(eventType: string, selector: string, function(event)) : function
$.learn() : object
$.teach(payload [, function(state, payload)])
Browser Support: The tail feature set for this application is ES Modules, which is supported by all modern browsers. For an entertaining summary, please refer to Making Future Interfaces: ES Modules.
<hello-name>
View ExampleThe Hello Name example shows the fundamentals of incorporating variables into the tag's state.
<hello-nickname>
View Example<hello-universe>
View Example<hello-gallery>
View Example<hello-editor>
View Example<hello-map>
View Example<hello-reddit>
View Example<hello-launcher>
View Example<window-pane>
View ExampleInspiring people building interesting projects are everywhere. These links helped shape Tag's development by just being cool things on the internet.
Tyler Childs is a netizen with a deep passion for the open web and radical transparency. He believes everyone can go further together and sharing knowledge is critical to group success.
You can reach him via email at [email protected] for any reason at any time. Response times may vary.
Fun fact! Tag is the final part in a now-complete solo trilogy. Vanilla HTML was a flop in 2013 and Cutestrap was a cult-hit in 2016!
Available on GitHub under the CC BY-SA 4.0