improve test for DOM API (callbcaks)