Skip to content

Commit c4d66c8

Browse files
committed
Document scripting_enabled option
Signed-off-by: Nico Burns <[email protected]>
1 parent e336619 commit c4d66c8

File tree

1 file changed

+5
-1
lines changed
  • html5ever/src/tree_builder

1 file changed

+5
-1
lines changed

html5ever/src/tree_builder/mod.rs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,10 +46,14 @@ mod types;
4646
#[derive(Copy, Clone)]
4747
pub struct TreeBuilderOpts {
4848
/// Report all parse errors described in the spec, at some
49-
/// performance penalty? Default: false
49+
/// performance penalty? Default: false
5050
pub exact_errors: bool,
5151

5252
/// Is scripting enabled?
53+
///
54+
/// This affects how `<noscript>` elements are parsed:
55+
/// - If scripting **is** enabled then the contents of a `<noscript>` element are parsed as a single text node
56+
/// - If scriping is **not** enabled then the contents of a `<noscript>` element are parsed as a normal tree of nodes
5357
pub scripting_enabled: bool,
5458

5559
/// Is this an `iframe srcdoc` document?

0 commit comments

Comments
 (0)