1<!doctype html> 2<title>Interaction of setTimeout and WebIDL</title> 3<link rel="author" title="Ian Hickson" href="mailto:ian@hixie.ch"> 4<link rel="author" title="Ms2ger" href="mailto:ms2ger@gmail.com"> 5<link rel="help" href="https://html.spec.whatwg.org/multipage/#dom-windowtimers-settimeout"> 6<link rel="help" href="https://heycam.github.io/webidl/#es-operations"> 7<script src="/resources/testharness.js"></script> 8<script src="/resources/testharnessreport.js"></script> 9<div id="log"></div> 10<script> 11var t = async_test() 12function finishTest() { 13 assert_equals(log, "ONE TWO ") 14 t.done() 15} 16var log = ''; 17function logger(s) { log += s + ' '; } 18 19setTimeout({ toString: function () { 20 setTimeout("logger('ONE')", 100); 21 return "logger('TWO'); t.step(finishTest)"; 22} }, 100); 23</script> 24