fn collect_style_blocks_from_dom(node: &Node) -> String
DOM ツリーを走査して全 <style> 要素の textContent を連結して返す。 元の HTML 文字列ではなく実際のツリーを見ることで、document.createElement('style') 等で 動的に追加された <style> 要素のスタイルも取得できる。
<style>
document.createElement('style')