Struct perseus::plugins::FunctionalPluginHtmlShellActions
source · pub struct FunctionalPluginHtmlShellActions {
pub add_to_head_before_boundary: FunctionalPluginAction<(), Vec<String>>,
pub add_to_scripts_before_boundary: FunctionalPluginAction<(), Vec<String>>,
pub add_to_head_after_boundary: FunctionalPluginAction<(), Vec<String>>,
pub add_to_scripts_after_boundary: FunctionalPluginAction<(), Vec<String>>,
pub add_to_before_content: FunctionalPluginAction<(), Vec<String>>,
pub add_to_after_content: FunctionalPluginAction<(), Vec<String>>,
}
Expand description
Functional actions that pertain to the HTML shell.
IMPORTANT: The HTML shell’s <head>
contains an interpolation
boundary, after which all content is wiped between page loads. If you want
the code you add (HTML or JS) to persist between pages (which you usually
will), make sure to use the ..._before_boundary
actions.
Fields§
§add_to_head_before_boundary: FunctionalPluginAction<(), Vec<String>>
Adds to the additional HTML content in the document <head>
before the
interpolation boundary.
add_to_scripts_before_boundary: FunctionalPluginAction<(), Vec<String>>
Adds JS code (which will be placed into a <script>
block) before the
interpolation boundary.
add_to_head_after_boundary: FunctionalPluginAction<(), Vec<String>>
Adds to the additional HTML content in the document <head>
after the
interpolation boundary.
add_to_scripts_after_boundary: FunctionalPluginAction<(), Vec<String>>
Adds Js code (which will places into a <script>
block) after the
interpolation boundary.
add_to_before_content: FunctionalPluginAction<(), Vec<String>>
Adds arbitrary HTML to the document <body>
before the Perseus app
markup. This will persist across all pages of the app.
add_to_after_content: FunctionalPluginAction<(), Vec<String>>
Adds arbitrary HTML to the document <body>
after the Perseus app
markup. This will persist across all pages of the app.