| @@ 769-779 (lines=11) @@ | ||
| 766 | * |
|
| 767 | * @return \Jaxon\Plugin\Response |
|
| 768 | */ |
|
| 769 | public function setEvent($sTarget, $sEvent, $sScript) |
|
| 770 | { |
|
| 771 | return $this->addCommand( |
|
| 772 | array( |
|
| 773 | 'cmd' => 'ev', |
|
| 774 | 'id' => trim((string)$sTarget, " \t"), |
|
| 775 | 'prop' => trim((string)$sEvent, " \t") |
|
| 776 | ), |
|
| 777 | trim((string)$sScript, " \t\n") |
|
| 778 | ); |
|
| 779 | } |
|
| 780 | ||
| 781 | /** |
|
| 782 | * Add a command to set a click handler on the browser |
|
| @@ 805-815 (lines=11) @@ | ||
| 802 | * |
|
| 803 | * @return \Jaxon\Plugin\Response |
|
| 804 | */ |
|
| 805 | public function addHandler($sTarget, $sEvent, $sHandler) |
|
| 806 | { |
|
| 807 | return $this->addCommand( |
|
| 808 | array( |
|
| 809 | 'cmd' => 'ah', |
|
| 810 | 'id' => trim((string)$sTarget, " \t"), |
|
| 811 | 'prop' => trim((string)$sEvent, " \t") |
|
| 812 | ), |
|
| 813 | trim((string)$sHandler, " \t\n") |
|
| 814 | ); |
|
| 815 | } |
|
| 816 | ||
| 817 | /** |
|
| 818 | * Add a command to remove an event handler from an element |
|
| @@ 826-836 (lines=11) @@ | ||
| 823 | * |
|
| 824 | * @return \Jaxon\Plugin\Response |
|
| 825 | */ |
|
| 826 | public function removeHandler($sTarget, $sEvent, $sHandler) |
|
| 827 | { |
|
| 828 | return $this->addCommand( |
|
| 829 | array( |
|
| 830 | 'cmd' => 'rh', |
|
| 831 | 'id' => trim((string)$sTarget, " \t"), |
|
| 832 | 'prop' => trim((string)$sEvent, " \t") |
|
| 833 | ), |
|
| 834 | trim((string)$sHandler, " \t\n") |
|
| 835 | ); |
|
| 836 | } |
|
| 837 | ||
| 838 | /** |
|
| 839 | * Add a command to construct a javascript function on the browser |
|