mshtml: Check if value is function only when it needs to be in invoke_builtin_prop.
[wine] / dlls / mshtml / tests / vbtest.html
1 <html>
2 <head>
3 <script type="text/vbscript">
4 Dim counter
5
6 counter = 1
7
8 Sub ok(b,m)
9     Call external.ok(b,m)
10 End Sub
11 </script>
12 <script>
13 ' Verifies that we're in VBScript although there is no type specified
14 If true then counter = counter+1
15 function inccounter(x)
16     counter = counter+x
17 end function
18 </script>
19 <script type="text/javascript">
20 // We're in javascript
21 try {
22     counter++;
23     incCounter(2);
24 }catch(e) {
25     ok(false, "got an exception");
26 }
27 </script>
28 <script>
29 ' And back to VBScript
30 If true then counter = counter+1
31
32 Sub runTest()
33     Call ok(counter = 6, "counter = " & counter)
34     Call ok(isNull(document.onkeyup), "document.onkeyup is not null")
35     Call external.reportSuccess()
36 End Sub
37 </script>
38 <script type="text/javascript">
39 // We're in javascript
40 </script>
41 <body onload="If true then runTest()">
42 </body>
43 </html>