@@ -10,11 +10,11 @@ use html5ever::{interface::QualName, namespace_url, ns, tendril::TendrilSink, Lo
1010pub use kuchiki:: NodeRef ;
1111use kuchiki:: { Attribute , ExpandedName } ;
1212use serde:: Serialize ;
13- #[ cfg( feature = "isolation" ) ]
13+ #[ cfg( any ( feature = "isolation" , feature = "__isolation-docs" ) ) ]
1414use serialize_to_javascript:: DefaultTemplate ;
1515
1616use crate :: config:: PatternKind ;
17- #[ cfg( feature = "isolation" ) ]
17+ #[ cfg( any ( feature = "isolation" , feature = "__isolation-docs" ) ) ]
1818use crate :: pattern:: isolation:: IsolationJavascriptCodegen ;
1919
2020/// The token used on the CSP tag content.
@@ -115,7 +115,7 @@ impl From<&PatternKind> for PatternObject {
115115 fn from ( pattern_kind : & PatternKind ) -> Self {
116116 match pattern_kind {
117117 PatternKind :: Brownfield => Self :: Brownfield ,
118- #[ cfg( feature = "isolation" ) ]
118+ #[ cfg( any ( feature = "isolation" , feature = "__isolation-docs" ) ) ]
119119 PatternKind :: Isolation { .. } => Self :: Isolation {
120120 side : IsolationSide :: default ( ) ,
121121 } ,
@@ -142,7 +142,7 @@ impl Default for IsolationSide {
142142/// Injects the Isolation JavaScript to a codegen time document.
143143///
144144/// Note: This function is not considered part of the stable API.
145- #[ cfg( feature = "isolation" ) ]
145+ #[ cfg( any ( feature = "isolation" , feature = "__isolation-docs" ) ) ]
146146pub fn inject_codegen_isolation_script ( document : & mut NodeRef ) {
147147 with_head ( document, |head| {
148148 let script = NodeRef :: new_element ( QualName :: new ( None , ns ! ( html) , "script" . into ( ) ) , None ) ;
0 commit comments