11cb0ef41Sopenharmony_ci<!doctype html> 21cb0ef41Sopenharmony_ci<title>Interaction of setTimeout and WebIDL</title> 31cb0ef41Sopenharmony_ci<link rel="author" title="Ian Hickson" href="mailto:ian@hixie.ch"> 41cb0ef41Sopenharmony_ci<link rel="author" title="Ms2ger" href="mailto:ms2ger@gmail.com"> 51cb0ef41Sopenharmony_ci<link rel="help" href="https://html.spec.whatwg.org/multipage/#dom-windowtimers-settimeout"> 61cb0ef41Sopenharmony_ci<link rel="help" href="https://heycam.github.io/webidl/#es-operations"> 71cb0ef41Sopenharmony_ci<script src="/resources/testharness.js"></script> 81cb0ef41Sopenharmony_ci<script src="/resources/testharnessreport.js"></script> 91cb0ef41Sopenharmony_ci<div id="log"></div> 101cb0ef41Sopenharmony_ci<script> 111cb0ef41Sopenharmony_civar t = async_test() 121cb0ef41Sopenharmony_cifunction finishTest() { 131cb0ef41Sopenharmony_ci assert_equals(log, "ONE TWO ") 141cb0ef41Sopenharmony_ci t.done() 151cb0ef41Sopenharmony_ci} 161cb0ef41Sopenharmony_civar log = ''; 171cb0ef41Sopenharmony_cifunction logger(s) { log += s + ' '; } 181cb0ef41Sopenharmony_ci 191cb0ef41Sopenharmony_cisetTimeout({ toString: function () { 201cb0ef41Sopenharmony_ci setTimeout("logger('ONE')", 100); 211cb0ef41Sopenharmony_ci return "logger('TWO'); t.step(finishTest)"; 221cb0ef41Sopenharmony_ci} }, 100); 231cb0ef41Sopenharmony_ci</script> 24