• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1<html>
2<head>
3<script src="resources/profiler-test-JS-resources.js"></script>
4<script>
5console.profile("Using the call() method");
6function startTest()
7{
8    var myObject = new fakeObject(1, 2);
9    endTest();
10}
11
12function fakeObject (x, y)
13{
14    this.x = x;
15    fakeInteriorFunction.call(this, y);
16}
17
18function fakeInteriorFunction(y)
19{
20    this.y = y;
21}
22
23</script>
24</head>
25
26<body onload="startTest()">
27This page's JavaScript has a call to call() in it.
28<br>
29<br>
30To use this test, load it in the browser then load the WebInspector and look at
31the profile.  In the profile there should be a call to fakeObject() with call() as
32its child and a fakeInteriorFunction() as call()'s child.
33<div id="output"></div>
34</body>
35</html>
36