use currentState instead of string
test value when DOMContentLoaded event is fired