The ability to reply to discussions is limited to PRO members. Want to join in the discussion? Click here to subscribe now.

Riot JS - DOM Events

Riot JS - DOM Events

2:49
Riot can listen for raw dom events on any element by adding the on* attribute to elements and referencing an event handler. Let's walk through a couple examples.
Watch this lesson now
Avatar
egghead.io

Riot can listen for raw dom events on any element by adding the on* attribute to elements and referencing an event handler. Let's walk through a couple examples.

Avatar
Ari

This was great. Where's the list of DOM events?

In reply to egghead.io
Avatar
Tim

Not sure, but I do have them listed in my github repo. Towards the bottom of the file: https://github.com/timkindberg/riot-js-egghead/blob/04_DomEvents/app.tag#L55-L127

In reply to Ari
Avatar
Gabriel

Great intro Tim.
I think the options lesson should be second in the playlist rather than third but I might have it wrong.

Avatar
Prabu

Also, you can refer to a tag by name. For example, if you had multiple trim tags, you could refer a particular trim tag by assigning name="trim1" on the tag and then referrring it by self.tags.trim1

HEY, QUICK QUESTION!
Joel's Head
Why are we asking?