pub const GET_DOM_JS: &str = r#"
(function(selector) {
const root = selector ? document.querySelector(selector) : document.documentElement;
if (!root) return null;
if (typeof root.getHTML === 'function') {
try { return root.getHTML({ serializableShadowRoots: true }); } catch (e) {}
}
return root.outerHTML;
})
"#;Expand description
Serializes the DOM with shadow roots included.