mirror of
https://github.com/1C-Company/v8-code-style.git
synced 2024-12-14 14:10:09 +02:00
b9d720966f
* Добавил проверку единичного использования обработчика событий
654 B
654 B
Check handler has assigned to a single event
Check handler has assigned to a single event
Noncompliant Code Example
If you mix two event in a single procedure, its logic gets complicated and decreases its stability.
Compliant Solution
Assign a handler for each event. If different actions are required in case of events in different form items:
- Create a separate procedure or a function that executes the required action.
- Сreate a separate handler for each form item.
- Call the required procedure or function from each handler.