HTMLDocument#makeScript
Fix test
Element#castAttributes
Use castAttributes in Element#extend