wxiaoguang
27bf63ad20
Refactor global init code and add more comments ( #33755 )
...
Follow up #33748
Now there are 3 "global" functions:
* registerGlobalSelectorFunc: for all elements matching the selector, eg: `.ui.dropdown`
* registerGlobalInitFunc: for `data-global-init="initInputAutoFocusEnd"`
* registerGlobalEventFunc: for `data-global-click="onCommentReactionButtonClick"`
And introduce `initGlobalInput` to replace old `initAutoFocusEnd` and
`attachDirAuto`, use `data-global-init` to replace fragile
`.js-autofocus-end` selector.
Another benefit is that by the new approach, no matter how many times
`registerGlobalInitFunc` is called, we only need to do one
"querySelectorAll" in the last step, it could slightly improve the
performance.
2025-03-03 10:57:28 +08:00
..
2025-02-06 21:07:44 +08:00
2025-03-01 02:02:10 +00:00
2025-02-20 22:53:38 +08:00
2025-01-22 15:11:51 +08:00
2024-12-22 02:59:25 +08:00
2024-07-07 15:32:30 +00:00
2024-12-14 03:10:20 +00:00
2024-12-22 02:59:25 +08:00
2025-01-22 15:11:51 +08:00
2025-01-22 15:11:51 +08:00
2025-01-22 15:11:51 +08:00
2024-07-07 15:32:30 +00:00
2024-12-16 05:02:32 +08:00
2025-02-06 21:07:44 +08:00
2025-03-03 10:57:28 +08:00
2025-01-22 15:11:51 +08:00
2024-12-12 19:02:54 +00:00
2025-01-22 15:11:51 +08:00
2025-01-16 04:26:17 +08:00
2025-01-22 15:11:51 +08:00
2025-01-22 15:11:51 +08:00
2024-12-22 02:59:25 +08:00
2025-01-22 15:11:51 +08:00
2025-01-22 15:11:51 +08:00
2025-01-22 15:11:51 +08:00
2025-01-22 15:11:51 +08:00
2025-01-17 08:55:02 +00:00
2025-01-06 17:38:42 +08:00
2024-12-22 02:59:25 +08:00
2025-01-22 15:11:51 +08:00
2025-01-22 15:11:51 +08:00
2024-07-07 15:32:30 +00:00
2025-01-16 04:26:17 +08:00
2024-12-11 09:29:04 +01:00
2025-01-04 10:56:07 +08:00
2025-01-16 04:26:17 +08:00
2025-02-21 17:46:05 +00:00
2025-02-27 18:18:02 +00:00
2024-12-11 09:29:04 +01:00
2024-07-07 15:32:30 +00:00
2025-02-28 00:58:25 +00:00
2025-03-03 10:57:28 +08:00
2025-01-22 15:11:51 +08:00
2024-07-07 15:32:30 +00:00
2025-01-22 15:11:51 +08:00
2025-03-01 02:02:10 +00:00
2025-01-22 15:11:51 +08:00
2025-01-22 15:11:51 +08:00
2025-01-25 09:37:25 +08:00
2025-01-22 15:11:51 +08:00
2024-07-07 15:32:30 +00:00
2024-12-11 09:29:04 +01:00
2025-01-22 15:11:51 +08:00
2025-01-30 22:54:50 +00:00
2025-01-06 17:38:42 +08:00
2025-01-31 20:47:31 +08:00
2025-02-28 16:37:16 +08:00
2025-01-22 15:11:51 +08:00
2024-12-11 09:29:04 +01:00
2024-11-05 07:46:40 +00:00
2025-01-22 15:11:51 +08:00
2024-12-19 08:37:12 +00:00
2024-12-22 02:59:25 +08:00
2024-12-22 02:59:25 +08:00
2024-12-19 08:37:12 +00:00
2024-11-28 02:15:59 +00:00
2025-02-06 21:07:44 +08:00
2024-12-12 18:37:44 +00:00
2025-01-22 15:11:51 +08:00
2025-01-16 04:26:17 +08:00
2025-01-22 15:11:51 +08:00
2025-01-22 15:11:51 +08:00
2025-01-22 15:11:51 +08:00
2025-01-22 15:11:51 +08:00
2024-10-17 10:28:51 +08:00
2025-02-06 21:07:44 +08:00