fix compatibility issues for IE

- Element.contains is not supported
- innerHTML is not supported