| 1 | package SyForm::CommonRole::EventHTML; | ||
| 2 | 7 | ▶ | BEGIN { |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 3 | 7 | $SyForm::CommonRole::EventHTML::AUTHORITY = 'cpan:GETTY'; | |
| 4 | } | ||
| 5 | # ABSTRACT: Standard role for objects with HTML event attributes | ||
| 6 | 7 | $SyForm::CommonRole::EventHTML::VERSION = '0.103'; | |
| 7 | 7 | ▶ | use Moo::Role; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 8 | |||
| 9 | 7 | our @events = qw( | |
| 10 | afterprint | ||
| 11 | beforeprint | ||
| 12 | beforeunload | ||
| 13 | error | ||
| 14 | haschange | ||
| 15 | load | ||
| 16 | message | ||
| 17 | offline | ||
| 18 | online | ||
| 19 | pagehide | ||
| 20 | pageshow | ||
| 21 | popstate | ||
| 22 | redo | ||
| 23 | resize | ||
| 24 | storage | ||
| 25 | undo | ||
| 26 | unload | ||
| 27 | |||
| 28 | blur | ||
| 29 | change | ||
| 30 | contextmenu | ||
| 31 | focus | ||
| 32 | formchange | ||
| 33 | forminput | ||
| 34 | input | ||
| 35 | invalid | ||
| 36 | reset | ||
| 37 | select | ||
| 38 | submit | ||
| 39 | |||
| 40 | keydown | ||
| 41 | keypress | ||
| 42 | keyup | ||
| 43 | |||
| 44 | click | ||
| 45 | dblclick | ||
| 46 | drag | ||
| 47 | dragend | ||
| 48 | dragenter | ||
| 49 | dragleave | ||
| 50 | dragover | ||
| 51 | dragstart | ||
| 52 | drop | ||
| 53 | mousedown | ||
| 54 | mousemove | ||
| 55 | mouseout | ||
| 56 | mouseover | ||
| 57 | mouseup | ||
| 58 | mousewheel | ||
| 59 | scroll | ||
| 60 | |||
| 61 | abort | ||
| 62 | canplay | ||
| 63 | canplaythrough | ||
| 64 | durationchange | ||
| 65 | emptied | ||
| 66 | ended | ||
| 67 | loadeddata | ||
| 68 | loadedmetadata | ||
| 69 | loadstart | ||
| 70 | pause | ||
| 71 | play | ||
| 72 | playing | ||
| 73 | progress | ||
| 74 | ratechange | ||
| 75 | readystatechange | ||
| 76 | seeked | ||
| 77 | seeking | ||
| 78 | stalled | ||
| 79 | suspend | ||
| 80 | timeupdate | ||
| 81 | volumechange | ||
| 82 | waiting | ||
| 83 | ); | ||
| 84 | |||
| 85 | 7 | our @attributes = map { 'on'.$_ } @events; | |
| 86 | |||
| 87 | 7 | for my $attribute (@attributes) { | |
| 88 | 483 | has $attribute => ( | |
| 89 | is => 'ro', | ||
| 90 | predicate => 1, | ||
| 91 | ); | ||
| 92 | } | ||
| 93 | |||
| 94 | 7 | 1; | |
| 95 | |||
| 96 | __END__ | ||