| @@ 697-704 (lines=8) @@ | ||
| 694 | * |
|
| 695 | * @return Response |
|
| 696 | */ |
|
| 697 | public function setEvent($sTarget, $sEvent, $sScript) |
|
| 698 | { |
|
| 699 | $aAttributes = [ |
|
| 700 | 'id' => trim((string)$sTarget, " \t"), |
|
| 701 | 'prop' => trim((string)$sEvent, " \t") |
|
| 702 | ]; |
|
| 703 | return $this->_addCommand('ev', $aAttributes, trim((string)$sScript, " \t\n")); |
|
| 704 | } |
|
| 705 | ||
| 706 | /** |
|
| 707 | * Add a command to set a click handler on the browser |
|
| @@ 730-737 (lines=8) @@ | ||
| 727 | * |
|
| 728 | * @return Response |
|
| 729 | */ |
|
| 730 | public function addHandler($sTarget, $sEvent, $sHandler) |
|
| 731 | { |
|
| 732 | $aAttributes = [ |
|
| 733 | 'id' => trim((string)$sTarget, " \t"), |
|
| 734 | 'prop' => trim((string)$sEvent, " \t") |
|
| 735 | ]; |
|
| 736 | return $this->_addCommand('ah', $aAttributes, trim((string)$sHandler, " \t\n")); |
|
| 737 | } |
|
| 738 | ||
| 739 | /** |
|
| 740 | * Add a command to remove an event handler from an element |
|
| @@ 748-755 (lines=8) @@ | ||
| 745 | * |
|
| 746 | * @return Response |
|
| 747 | */ |
|
| 748 | public function removeHandler($sTarget, $sEvent, $sHandler) |
|
| 749 | { |
|
| 750 | $aAttributes = [ |
|
| 751 | 'id' => trim((string)$sTarget, " \t"), |
|
| 752 | 'prop' => trim((string)$sEvent, " \t") |
|
| 753 | ]; |
|
| 754 | return $this->_addCommand('rh', $aAttributes, trim((string)$sHandler, " \t\n")); |
|
| 755 | } |
|
| 756 | ||
| 757 | /** |
|
| 758 | * Add a command to construct a javascript function on the browser |
|