nomodule-set-on-external-module-script.html (864B)
1 <!DOCTYPE html> 2 <html> 3 <head> 4 <title>An external module script with nomodule must run</title> 5 <link rel="author" title="Yusuke Suzuki" href="mailto:utatane.tea@gmail.com"> 6 <link rel="author" title="Ryosuke Niwa" href="mailto:rniwa@webkit.org"> 7 <script src="/resources/testharness.js"></script> 8 <script src="/resources/testharnessreport.js"></script> 9 </head> 10 <body> 11 <script nomodule type="module" src="./resources/exports-cocoa.js"></script> 12 <script> 13 14 waitForLoadEvent = new Promise((resolve) => { 15 window.onload = resolve; 16 }); 17 18 promise_test(() => { 19 return waitForLoadEvent.then(() => { 20 assert_equals(typeof cocoa, 'undefined'); 21 assert_equals(typeof exportedCocoa, 'object'); 22 assert_equals(exportedCocoa.taste(), 'awesome'); 23 }); 24 }, 'An external module script with nomodule content attribute must run'); 25 26 </script> 27 </body> 28 </html>