fix script block generation
update CHTMLDocument class