1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT license.
//! Parser plugin trait and built-in plugin implementations.
//!
//! The plugin system is framework-agnostic — WebUI provides parsing hooks
//! and plugins decide what to do. Different frameworks (FAST, LIT, etc.)
//! implement `ParserPlugin` with their own component discovery and
//! hydration data emission logic.
pub use generate_f_template;
pub use FastParserPlugin;
use crateComponent;
use crateResult;
use Any;
/// A parser plugin that can customize template parsing behavior.
///
/// Plugins receive callbacks at key points during HTML parsing:
/// - **Component discovery**: `on_parse_component` when a custom element is found
/// - **Attribute filtering**: `should_skip_attribute` to skip framework-specific attrs
/// - **Body end injection**: `on_body_end` to inject framework content before `</body>`
/// - **Element completion**: `on_element_parsed` after attributes are processed
///
/// WebUI calls these hooks during parsing; plugins decide what (if anything) to do.