use IE js calls, fix #166 and #167