fix shadow dom init time latency