puppeteer-ruby 0.0.13 → 0.0.18

Sign up to get free protection for your applications and to get access to all the features.
Files changed (135) hide show
  1. checksums.yaml +4 -4
  2. data/.circleci/config.yml +2 -14
  3. data/.github/workflows/docs.yml +45 -0
  4. data/.github/workflows/reviewdog.yml +15 -0
  5. data/.rubocop.yml +39 -3
  6. data/README.md +54 -1
  7. data/lib/puppeteer.rb +10 -2
  8. data/lib/puppeteer/browser.rb +53 -34
  9. data/lib/puppeteer/browser_context.rb +35 -5
  10. data/lib/puppeteer/cdp_session.rb +3 -19
  11. data/lib/puppeteer/concurrent_ruby_utils.rb +6 -0
  12. data/lib/puppeteer/connection.rb +9 -16
  13. data/lib/puppeteer/debug_print.rb +1 -1
  14. data/lib/puppeteer/define_async_method.rb +23 -0
  15. data/lib/puppeteer/dom_world.rb +84 -73
  16. data/lib/puppeteer/element_handle.rb +46 -63
  17. data/lib/puppeteer/emulation_manager.rb +2 -6
  18. data/lib/puppeteer/env.rb +18 -0
  19. data/lib/puppeteer/execution_context.rb +1 -6
  20. data/lib/puppeteer/frame.rb +46 -46
  21. data/lib/puppeteer/frame_manager.rb +7 -25
  22. data/lib/puppeteer/js_handle.rb +39 -38
  23. data/lib/puppeteer/keyboard.rb +9 -29
  24. data/lib/puppeteer/mouse.rb +20 -24
  25. data/lib/puppeteer/network_manager.rb +163 -5
  26. data/lib/puppeteer/page.rb +221 -181
  27. data/lib/puppeteer/page/pdf_options.rb +166 -0
  28. data/lib/puppeteer/remote_object.rb +18 -5
  29. data/lib/puppeteer/request.rb +330 -0
  30. data/lib/puppeteer/response.rb +113 -0
  31. data/lib/puppeteer/touch_screen.rb +2 -7
  32. data/lib/puppeteer/version.rb +1 -1
  33. data/lib/puppeteer/wait_task.rb +3 -5
  34. data/lib/puppeteer/web_socket.rb +7 -0
  35. data/puppeteer-ruby.gemspec +2 -1
  36. metadata +25 -103
  37. data/docs/Puppeteer.html +0 -2338
  38. data/docs/Puppeteer/AsyncAwaitBehavior.html +0 -105
  39. data/docs/Puppeteer/Browser.html +0 -2258
  40. data/docs/Puppeteer/BrowserContext.html +0 -809
  41. data/docs/Puppeteer/BrowserFetcher.html +0 -214
  42. data/docs/Puppeteer/BrowserRunner.html +0 -914
  43. data/docs/Puppeteer/BrowserRunner/BrowserProcess.html +0 -477
  44. data/docs/Puppeteer/CDPSession.html +0 -813
  45. data/docs/Puppeteer/CDPSession/Error.html +0 -124
  46. data/docs/Puppeteer/ConcurrentRubyUtils.html +0 -438
  47. data/docs/Puppeteer/Connection.html +0 -964
  48. data/docs/Puppeteer/Connection/MessageCallback.html +0 -434
  49. data/docs/Puppeteer/Connection/ProtocolError.html +0 -216
  50. data/docs/Puppeteer/Connection/RequestDebugPrinter.html +0 -217
  51. data/docs/Puppeteer/Connection/ResponseDebugPrinter.html +0 -244
  52. data/docs/Puppeteer/ConsoleMessage.html +0 -565
  53. data/docs/Puppeteer/ConsoleMessage/Location.html +0 -433
  54. data/docs/Puppeteer/DOMWorld.html +0 -2293
  55. data/docs/Puppeteer/DOMWorld/DetachedError.html +0 -124
  56. data/docs/Puppeteer/DOMWorld/DocumentEvaluationError.html +0 -124
  57. data/docs/Puppeteer/DebugPrint.html +0 -233
  58. data/docs/Puppeteer/Device.html +0 -470
  59. data/docs/Puppeteer/Devices.html +0 -139
  60. data/docs/Puppeteer/ElementHandle.html +0 -2542
  61. data/docs/Puppeteer/ElementHandle/BoundingBox.html +0 -507
  62. data/docs/Puppeteer/ElementHandle/BoxModel.html +0 -404
  63. data/docs/Puppeteer/ElementHandle/ElementNotFoundError.html +0 -206
  64. data/docs/Puppeteer/ElementHandle/ElementNotVisibleError.html +0 -206
  65. data/docs/Puppeteer/ElementHandle/Point.html +0 -492
  66. data/docs/Puppeteer/ElementHandle/ScrollIntoViewError.html +0 -124
  67. data/docs/Puppeteer/EmulationManager.html +0 -454
  68. data/docs/Puppeteer/EventCallbackable.html +0 -499
  69. data/docs/Puppeteer/EventCallbackable/EventListeners.html +0 -435
  70. data/docs/Puppeteer/ExecutionContext.html +0 -998
  71. data/docs/Puppeteer/ExecutionContext/EvaluationError.html +0 -124
  72. data/docs/Puppeteer/ExecutionContext/JavaScriptExpression.html +0 -357
  73. data/docs/Puppeteer/ExecutionContext/JavaScriptFunction.html +0 -389
  74. data/docs/Puppeteer/FileChooser.html +0 -455
  75. data/docs/Puppeteer/Frame.html +0 -3835
  76. data/docs/Puppeteer/FrameManager.html +0 -2410
  77. data/docs/Puppeteer/FrameManager/NavigationError.html +0 -124
  78. data/docs/Puppeteer/IfPresent.html +0 -222
  79. data/docs/Puppeteer/JSHandle.html +0 -1352
  80. data/docs/Puppeteer/Keyboard.html +0 -1557
  81. data/docs/Puppeteer/Keyboard/KeyDefinition.html +0 -831
  82. data/docs/Puppeteer/Keyboard/KeyDescription.html +0 -603
  83. data/docs/Puppeteer/Launcher.html +0 -237
  84. data/docs/Puppeteer/Launcher/Base.html +0 -385
  85. data/docs/Puppeteer/Launcher/Base/ExecutablePathNotFound.html +0 -124
  86. data/docs/Puppeteer/Launcher/BrowserOptions.html +0 -441
  87. data/docs/Puppeteer/Launcher/Chrome.html +0 -674
  88. data/docs/Puppeteer/Launcher/Chrome/DefaultArgs.html +0 -382
  89. data/docs/Puppeteer/Launcher/ChromeArgOptions.html +0 -531
  90. data/docs/Puppeteer/Launcher/LaunchOptions.html +0 -893
  91. data/docs/Puppeteer/LifecycleWatcher.html +0 -834
  92. data/docs/Puppeteer/LifecycleWatcher/ExpectedLifecycle.html +0 -363
  93. data/docs/Puppeteer/LifecycleWatcher/FrameDetachedError.html +0 -206
  94. data/docs/Puppeteer/LifecycleWatcher/TerminatedError.html +0 -124
  95. data/docs/Puppeteer/Mouse.html +0 -1095
  96. data/docs/Puppeteer/Mouse/Button.html +0 -136
  97. data/docs/Puppeteer/NetworkManager.html +0 -901
  98. data/docs/Puppeteer/NetworkManager/Credentials.html +0 -385
  99. data/docs/Puppeteer/Page.html +0 -6173
  100. data/docs/Puppeteer/Page/FileChooserTimeoutError.html +0 -206
  101. data/docs/Puppeteer/Page/ScreenshotOptions.html +0 -845
  102. data/docs/Puppeteer/Page/ScriptTag.html +0 -555
  103. data/docs/Puppeteer/Page/StyleTag.html +0 -448
  104. data/docs/Puppeteer/Page/TargetCrashedError.html +0 -124
  105. data/docs/Puppeteer/RemoteObject.html +0 -1087
  106. data/docs/Puppeteer/Target.html +0 -1336
  107. data/docs/Puppeteer/Target/InitializeFailure.html +0 -124
  108. data/docs/Puppeteer/Target/TargetInfo.html +0 -729
  109. data/docs/Puppeteer/TimeoutError.html +0 -135
  110. data/docs/Puppeteer/TimeoutSettings.html +0 -496
  111. data/docs/Puppeteer/TouchScreen.html +0 -464
  112. data/docs/Puppeteer/Viewport.html +0 -837
  113. data/docs/Puppeteer/WaitTask.html +0 -637
  114. data/docs/Puppeteer/WaitTask/TerminatedError.html +0 -124
  115. data/docs/Puppeteer/WaitTask/TimeoutError.html +0 -206
  116. data/docs/Puppeteer/WebSocket.html +0 -673
  117. data/docs/Puppeteer/WebSocket/DriverImpl.html +0 -412
  118. data/docs/Puppeteer/WebSocket/TransportError.html +0 -124
  119. data/docs/Puppeteer/WebSocketTransport.html +0 -600
  120. data/docs/Puppeteer/WebSocktTransportError.html +0 -124
  121. data/docs/_index.html +0 -816
  122. data/docs/class_list.html +0 -51
  123. data/docs/css/common.css +0 -1
  124. data/docs/css/full_list.css +0 -58
  125. data/docs/css/style.css +0 -496
  126. data/docs/file.README.html +0 -125
  127. data/docs/file_list.html +0 -56
  128. data/docs/frames.html +0 -17
  129. data/docs/index.html +0 -125
  130. data/docs/js/app.js +0 -314
  131. data/docs/js/full_list.js +0 -216
  132. data/docs/js/jquery.js +0 -4
  133. data/docs/method_list.html +0 -4123
  134. data/docs/top-level-namespace.html +0 -126
  135. data/lib/puppeteer/async_await_behavior.rb +0 -38
@@ -1,435 +0,0 @@
1
- <!DOCTYPE html>
2
- <html>
3
- <head>
4
- <meta charset="utf-8">
5
- <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
- <title>
7
- Class: Puppeteer::EventCallbackable::EventListeners
8
-
9
- &mdash; Documentation by YARD 0.9.24
10
-
11
- </title>
12
-
13
- <link rel="stylesheet" href="../../css/style.css" type="text/css" />
14
-
15
- <link rel="stylesheet" href="../../css/common.css" type="text/css" />
16
-
17
- <script type="text/javascript">
18
- pathId = "Puppeteer::EventCallbackable::EventListeners";
19
- relpath = '../../';
20
- </script>
21
-
22
-
23
- <script type="text/javascript" charset="utf-8" src="../../js/jquery.js"></script>
24
-
25
- <script type="text/javascript" charset="utf-8" src="../../js/app.js"></script>
26
-
27
-
28
- </head>
29
- <body>
30
- <div class="nav_wrap">
31
- <iframe id="nav" src="../../class_list.html?1"></iframe>
32
- <div id="resizer"></div>
33
- </div>
34
-
35
- <div id="main" tabindex="-1">
36
- <div id="header">
37
- <div id="menu">
38
-
39
- <a href="../../_index.html">Index (E)</a> &raquo;
40
- <span class='title'><span class='object_link'><a href="../../Puppeteer.html" title="Puppeteer (class)">Puppeteer</a></span></span> &raquo; <span class='title'><span class='object_link'><a href="../EventCallbackable.html" title="Puppeteer::EventCallbackable (module)">EventCallbackable</a></span></span>
41
- &raquo;
42
- <span class="title">EventListeners</span>
43
-
44
- </div>
45
-
46
- <div id="search">
47
-
48
- <a class="full_list_link" id="class_list_link"
49
- href="../../class_list.html">
50
-
51
- <svg width="24" height="24">
52
- <rect x="0" y="4" width="24" height="4" rx="1" ry="1"></rect>
53
- <rect x="0" y="12" width="24" height="4" rx="1" ry="1"></rect>
54
- <rect x="0" y="20" width="24" height="4" rx="1" ry="1"></rect>
55
- </svg>
56
- </a>
57
-
58
- </div>
59
- <div class="clear"></div>
60
- </div>
61
-
62
- <div id="content"><h1>Class: Puppeteer::EventCallbackable::EventListeners
63
-
64
-
65
-
66
- </h1>
67
- <div class="box_info">
68
-
69
- <dl>
70
- <dt>Inherits:</dt>
71
- <dd>
72
- <span class="inheritName">Object</span>
73
-
74
- <ul class="fullTree">
75
- <li>Object</li>
76
-
77
- <li class="next">Puppeteer::EventCallbackable::EventListeners</li>
78
-
79
- </ul>
80
- <a href="#" class="inheritanceTree">show all</a>
81
-
82
- </dd>
83
- </dl>
84
-
85
-
86
-
87
-
88
-
89
-
90
- <dl>
91
- <dt>Includes:</dt>
92
- <dd>Enumerable</dd>
93
- </dl>
94
-
95
-
96
-
97
-
98
-
99
-
100
- <dl>
101
- <dt>Defined in:</dt>
102
- <dd>lib/puppeteer/event_callbackable.rb</dd>
103
- </dl>
104
-
105
- </div>
106
-
107
-
108
-
109
-
110
-
111
-
112
-
113
-
114
-
115
- <h2>
116
- Instance Method Summary
117
- <small><a href="#" class="summary_toggle">collapse</a></small>
118
- </h2>
119
-
120
- <ul class="summary">
121
-
122
- <li class="public ">
123
- <span class="summary_signature">
124
-
125
- <a href="#add-instance_method" title="#add (instance method)">#<strong>add</strong>(&amp;block) &#x21d2; String </a>
126
-
127
-
128
-
129
- </span>
130
-
131
-
132
-
133
-
134
-
135
-
136
-
137
-
138
-
139
- <span class="summary_desc"><div class='inline'>
140
- <p>Listener ID.</p>
141
- </div></span>
142
-
143
- </li>
144
-
145
-
146
- <li class="public ">
147
- <span class="summary_signature">
148
-
149
- <a href="#delete-instance_method" title="#delete (instance method)">#<strong>delete</strong>(id) &#x21d2; Object </a>
150
-
151
-
152
-
153
- </span>
154
-
155
-
156
-
157
-
158
-
159
-
160
-
161
-
162
-
163
- <span class="summary_desc"><div class='inline'></div></span>
164
-
165
- </li>
166
-
167
-
168
- <li class="public ">
169
- <span class="summary_signature">
170
-
171
- <a href="#each-instance_method" title="#each (instance method)">#<strong>each</strong>(&amp;block) &#x21d2; Object </a>
172
-
173
-
174
-
175
- </span>
176
-
177
-
178
-
179
-
180
-
181
-
182
-
183
-
184
-
185
- <span class="summary_desc"><div class='inline'></div></span>
186
-
187
- </li>
188
-
189
-
190
- <li class="public ">
191
- <span class="summary_signature">
192
-
193
- <a href="#initialize-instance_method" title="#initialize (instance method)">#<strong>initialize</strong> &#x21d2; EventListeners </a>
194
-
195
-
196
-
197
- </span>
198
-
199
-
200
- <span class="note title constructor">constructor</span>
201
-
202
-
203
-
204
-
205
-
206
-
207
-
208
-
209
- <span class="summary_desc"><div class='inline'>
210
- <p>A new instance of EventListeners.</p>
211
- </div></span>
212
-
213
- </li>
214
-
215
-
216
- </ul>
217
-
218
-
219
-
220
- <div id="constructor_details" class="method_details_list">
221
- <h2>Constructor Details</h2>
222
-
223
- <div class="method_details first">
224
- <h3 class="signature first" id="initialize-instance_method">
225
-
226
- #<strong>initialize</strong> &#x21d2; <tt><span class='object_link'><a href="" title="Puppeteer::EventCallbackable::EventListeners (class)">EventListeners</a></span></tt>
227
-
228
-
229
-
230
-
231
-
232
- </h3><div class="docstring">
233
- <div class="discussion">
234
-
235
- <p>Returns a new instance of EventListeners.</p>
236
-
237
-
238
- </div>
239
- </div>
240
- <div class="tags">
241
-
242
-
243
- </div><table class="source_code">
244
- <tr>
245
- <td>
246
- <pre class="lines">
247
-
248
-
249
- 7
250
- 8
251
- 9</pre>
252
- </td>
253
- <td>
254
- <pre class="code"><span class="info file"># File 'lib/puppeteer/event_callbackable.rb', line 7</span>
255
-
256
- <span class='kw'>def</span> <span class='id identifier rubyid_initialize'>initialize</span>
257
- <span class='ivar'>@listeners</span> <span class='op'>=</span> <span class='lbrace'>{</span><span class='rbrace'>}</span>
258
- <span class='kw'>end</span></pre>
259
- </td>
260
- </tr>
261
- </table>
262
- </div>
263
-
264
- </div>
265
-
266
-
267
- <div id="instance_method_details" class="method_details_list">
268
- <h2>Instance Method Details</h2>
269
-
270
-
271
- <div class="method_details first">
272
- <h3 class="signature first" id="add-instance_method">
273
-
274
- #<strong>add</strong>(&amp;block) &#x21d2; <tt>String</tt>
275
-
276
-
277
-
278
-
279
-
280
- </h3><div class="docstring">
281
- <div class="discussion">
282
-
283
- <p>Returns Listener ID.</p>
284
-
285
-
286
- </div>
287
- </div>
288
- <div class="tags">
289
-
290
- <p class="tag_title">Returns:</p>
291
- <ul class="return">
292
-
293
- <li>
294
-
295
-
296
- <span class='type'>(<tt>String</tt>)</span>
297
-
298
-
299
-
300
- &mdash;
301
- <div class='inline'>
302
- <p>Listener ID</p>
303
- </div>
304
-
305
- </li>
306
-
307
- </ul>
308
-
309
- </div><table class="source_code">
310
- <tr>
311
- <td>
312
- <pre class="lines">
313
-
314
-
315
- 12
316
- 13
317
- 14
318
- 15
319
- 16</pre>
320
- </td>
321
- <td>
322
- <pre class="code"><span class="info file"># File 'lib/puppeteer/event_callbackable.rb', line 12</span>
323
-
324
- <span class='kw'>def</span> <span class='id identifier rubyid_add'>add</span><span class='lparen'>(</span><span class='op'>&amp;</span><span class='id identifier rubyid_block'>block</span><span class='rparen'>)</span>
325
- <span class='id identifier rubyid_id'>id</span> <span class='op'>=</span> <span class='const'>SecureRandom</span><span class='period'>.</span><span class='id identifier rubyid_hex'>hex</span><span class='lparen'>(</span><span class='int'>8</span><span class='rparen'>)</span>
326
- <span class='ivar'>@listeners</span><span class='lbracket'>[</span><span class='id identifier rubyid_id'>id</span><span class='rbracket'>]</span> <span class='op'>=</span> <span class='id identifier rubyid_block'>block</span>
327
- <span class='id identifier rubyid_id'>id</span>
328
- <span class='kw'>end</span></pre>
329
- </td>
330
- </tr>
331
- </table>
332
- </div>
333
-
334
- <div class="method_details ">
335
- <h3 class="signature " id="delete-instance_method">
336
-
337
- #<strong>delete</strong>(id) &#x21d2; <tt>Object</tt>
338
-
339
-
340
-
341
-
342
-
343
- </h3><div class="docstring">
344
- <div class="discussion">
345
-
346
-
347
- </div>
348
- </div>
349
- <div class="tags">
350
- <p class="tag_title">Parameters:</p>
351
- <ul class="param">
352
-
353
- <li>
354
-
355
- <span class='name'>id</span>
356
-
357
-
358
- <span class='type'>(<tt>String</tt>)</span>
359
-
360
-
361
-
362
- &mdash;
363
- <div class='inline'>
364
- <p>Listener ID returned on #add</p>
365
- </div>
366
-
367
- </li>
368
-
369
- </ul>
370
-
371
-
372
- </div><table class="source_code">
373
- <tr>
374
- <td>
375
- <pre class="lines">
376
-
377
-
378
- 19
379
- 20
380
- 21</pre>
381
- </td>
382
- <td>
383
- <pre class="code"><span class="info file"># File 'lib/puppeteer/event_callbackable.rb', line 19</span>
384
-
385
- <span class='kw'>def</span> <span class='id identifier rubyid_delete'>delete</span><span class='lparen'>(</span><span class='id identifier rubyid_id'>id</span><span class='rparen'>)</span>
386
- <span class='ivar'>@listeners</span><span class='period'>.</span><span class='id identifier rubyid_delete'>delete</span><span class='lparen'>(</span><span class='id identifier rubyid_id'>id</span><span class='rparen'>)</span>
387
- <span class='kw'>end</span></pre>
388
- </td>
389
- </tr>
390
- </table>
391
- </div>
392
-
393
- <div class="method_details ">
394
- <h3 class="signature " id="each-instance_method">
395
-
396
- #<strong>each</strong>(&amp;block) &#x21d2; <tt>Object</tt>
397
-
398
-
399
-
400
-
401
-
402
- </h3><table class="source_code">
403
- <tr>
404
- <td>
405
- <pre class="lines">
406
-
407
-
408
- 24
409
- 25
410
- 26</pre>
411
- </td>
412
- <td>
413
- <pre class="code"><span class="info file"># File 'lib/puppeteer/event_callbackable.rb', line 24</span>
414
-
415
- <span class='kw'>def</span> <span class='id identifier rubyid_each'>each</span><span class='lparen'>(</span><span class='op'>&amp;</span><span class='id identifier rubyid_block'>block</span><span class='rparen'>)</span>
416
- <span class='ivar'>@listeners</span><span class='period'>.</span><span class='id identifier rubyid_values'>values</span><span class='period'>.</span><span class='id identifier rubyid_each'>each</span><span class='lparen'>(</span><span class='op'>&amp;</span><span class='id identifier rubyid_block'>block</span><span class='rparen'>)</span>
417
- <span class='kw'>end</span></pre>
418
- </td>
419
- </tr>
420
- </table>
421
- </div>
422
-
423
- </div>
424
-
425
- </div>
426
-
427
- <div id="footer">
428
- Generated on Wed Jun 24 03:08:01 2020 by
429
- <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
430
- 0.9.24 (ruby-2.6.3).
431
- </div>
432
-
433
- </div>
434
- </body>
435
- </html>
@@ -1,998 +0,0 @@
1
- <!DOCTYPE html>
2
- <html>
3
- <head>
4
- <meta charset="utf-8">
5
- <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
- <title>
7
- Class: Puppeteer::ExecutionContext
8
-
9
- &mdash; Documentation by YARD 0.9.24
10
-
11
- </title>
12
-
13
- <link rel="stylesheet" href="../css/style.css" type="text/css" />
14
-
15
- <link rel="stylesheet" href="../css/common.css" type="text/css" />
16
-
17
- <script type="text/javascript">
18
- pathId = "Puppeteer::ExecutionContext";
19
- relpath = '../';
20
- </script>
21
-
22
-
23
- <script type="text/javascript" charset="utf-8" src="../js/jquery.js"></script>
24
-
25
- <script type="text/javascript" charset="utf-8" src="../js/app.js"></script>
26
-
27
-
28
- </head>
29
- <body>
30
- <div class="nav_wrap">
31
- <iframe id="nav" src="../class_list.html?1"></iframe>
32
- <div id="resizer"></div>
33
- </div>
34
-
35
- <div id="main" tabindex="-1">
36
- <div id="header">
37
- <div id="menu">
38
-
39
- <a href="../_index.html">Index (E)</a> &raquo;
40
- <span class='title'><span class='object_link'><a href="../Puppeteer.html" title="Puppeteer (class)">Puppeteer</a></span></span>
41
- &raquo;
42
- <span class="title">ExecutionContext</span>
43
-
44
- </div>
45
-
46
- <div id="search">
47
-
48
- <a class="full_list_link" id="class_list_link"
49
- href="../class_list.html">
50
-
51
- <svg width="24" height="24">
52
- <rect x="0" y="4" width="24" height="4" rx="1" ry="1"></rect>
53
- <rect x="0" y="12" width="24" height="4" rx="1" ry="1"></rect>
54
- <rect x="0" y="20" width="24" height="4" rx="1" ry="1"></rect>
55
- </svg>
56
- </a>
57
-
58
- </div>
59
- <div class="clear"></div>
60
- </div>
61
-
62
- <div id="content"><h1>Class: Puppeteer::ExecutionContext
63
-
64
-
65
-
66
- </h1>
67
- <div class="box_info">
68
-
69
- <dl>
70
- <dt>Inherits:</dt>
71
- <dd>
72
- <span class="inheritName">Object</span>
73
-
74
- <ul class="fullTree">
75
- <li>Object</li>
76
-
77
- <li class="next">Puppeteer::ExecutionContext</li>
78
-
79
- </ul>
80
- <a href="#" class="inheritanceTree">show all</a>
81
-
82
- </dd>
83
- </dl>
84
-
85
-
86
-
87
-
88
-
89
-
90
- <dl>
91
- <dt>Includes:</dt>
92
- <dd><span class='object_link'><a href="IfPresent.html" title="Puppeteer::IfPresent (module)">IfPresent</a></span></dd>
93
- </dl>
94
-
95
-
96
-
97
-
98
-
99
-
100
- <dl>
101
- <dt>Defined in:</dt>
102
- <dd>lib/puppeteer/execution_context.rb</dd>
103
- </dl>
104
-
105
- </div>
106
-
107
- <h2>Defined Under Namespace</h2>
108
- <p class="children">
109
-
110
-
111
-
112
-
113
- <strong class="classes">Classes:</strong> <span class='object_link'><a href="ExecutionContext/EvaluationError.html" title="Puppeteer::ExecutionContext::EvaluationError (class)">EvaluationError</a></span>, <span class='object_link'><a href="ExecutionContext/JavaScriptExpression.html" title="Puppeteer::ExecutionContext::JavaScriptExpression (class)">JavaScriptExpression</a></span>, <span class='object_link'><a href="ExecutionContext/JavaScriptFunction.html" title="Puppeteer::ExecutionContext::JavaScriptFunction (class)">JavaScriptFunction</a></span>
114
-
115
-
116
- </p>
117
-
118
-
119
- <h2>
120
- Constant Summary
121
- <small><a href="#" class="constants_summary_toggle">collapse</a></small>
122
- </h2>
123
-
124
- <dl class="constants">
125
-
126
- <dt id="EVALUATION_SCRIPT_URL-constant" class="">EVALUATION_SCRIPT_URL =
127
-
128
- </dt>
129
- <dd><pre class="code"><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>__puppeteer_evaluation_script__</span><span class='tstring_end'>&#39;</span></span></pre></dd>
130
-
131
- <dt id="SOURCE_URL_REGEX-constant" class="">SOURCE_URL_REGEX =
132
-
133
- </dt>
134
- <dd><pre class="code"><span class='tstring'><span class='regexp_beg'>/</span><span class='tstring_content'>^[\040\t]*\/\/[@#] sourceURL=\s*(\S*?)\s*$</span><span class='regexp_end'>/m</span></span></pre></dd>
135
-
136
- </dl>
137
-
138
-
139
-
140
-
141
-
142
- <h2>Instance Attribute Summary <small><a href="#" class="summary_toggle">collapse</a></small></h2>
143
- <ul class="summary">
144
-
145
- <li class="public ">
146
- <span class="summary_signature">
147
-
148
- <a href="#client-instance_method" title="#client (instance method)">#<strong>client</strong> &#x21d2; Object </a>
149
-
150
-
151
-
152
- </span>
153
-
154
-
155
-
156
-
157
- <span class="note title readonly">readonly</span>
158
-
159
-
160
-
161
-
162
-
163
-
164
-
165
-
166
-
167
- <span class="summary_desc"><div class='inline'>
168
- <p>Returns the value of attribute client.</p>
169
- </div></span>
170
-
171
- </li>
172
-
173
-
174
- <li class="public ">
175
- <span class="summary_signature">
176
-
177
- <a href="#world-instance_method" title="#world (instance method)">#<strong>world</strong> &#x21d2; Object </a>
178
-
179
-
180
-
181
- </span>
182
-
183
-
184
-
185
-
186
- <span class="note title readonly">readonly</span>
187
-
188
-
189
-
190
-
191
-
192
-
193
-
194
-
195
-
196
- <span class="summary_desc"><div class='inline'>
197
- <p>Returns the value of attribute world.</p>
198
- </div></span>
199
-
200
- </li>
201
-
202
-
203
- </ul>
204
-
205
-
206
-
207
-
208
-
209
- <h2>
210
- Instance Method Summary
211
- <small><a href="#" class="summary_toggle">collapse</a></small>
212
- </h2>
213
-
214
- <ul class="summary">
215
-
216
- <li class="public ">
217
- <span class="summary_signature">
218
-
219
- <a href="#_context_id-instance_method" title="#_context_id (instance method)">#<strong>_context_id</strong> &#x21d2; Object </a>
220
-
221
-
222
-
223
- </span>
224
-
225
-
226
-
227
-
228
-
229
-
230
-
231
-
232
-
233
- <span class="summary_desc"><div class='inline'>
234
- <p>only used in DomWorld#delete_context.</p>
235
- </div></span>
236
-
237
- </li>
238
-
239
-
240
- <li class="public ">
241
- <span class="summary_signature">
242
-
243
- <a href="#adopt_backend_node_id-instance_method" title="#adopt_backend_node_id (instance method)">#<strong>adopt_backend_node_id</strong>(backend_node_id) &#x21d2; Puppeteer::ElementHandle </a>
244
-
245
-
246
-
247
- </span>
248
-
249
-
250
-
251
-
252
-
253
-
254
-
255
-
256
-
257
- <span class="summary_desc"><div class='inline'></div></span>
258
-
259
- </li>
260
-
261
-
262
- <li class="public ">
263
- <span class="summary_signature">
264
-
265
- <a href="#adopt_element_handle-instance_method" title="#adopt_element_handle (instance method)">#<strong>adopt_element_handle</strong>(element_handle) &#x21d2; Puppeteer::ElementHandle </a>
266
-
267
-
268
-
269
- </span>
270
-
271
-
272
-
273
-
274
-
275
-
276
-
277
-
278
-
279
- <span class="summary_desc"><div class='inline'></div></span>
280
-
281
- </li>
282
-
283
-
284
- <li class="public ">
285
- <span class="summary_signature">
286
-
287
- <a href="#evaluate-instance_method" title="#evaluate (instance method)">#<strong>evaluate</strong>(page_function, *args) &#x21d2; Object </a>
288
-
289
-
290
-
291
- </span>
292
-
293
-
294
-
295
-
296
-
297
-
298
-
299
-
300
-
301
- <span class="summary_desc"><div class='inline'></div></span>
302
-
303
- </li>
304
-
305
-
306
- <li class="public ">
307
- <span class="summary_signature">
308
-
309
- <a href="#evaluate_handle-instance_method" title="#evaluate_handle (instance method)">#<strong>evaluate_handle</strong>(page_function, *args) &#x21d2; Puppeteer::JSHandle </a>
310
-
311
-
312
-
313
- </span>
314
-
315
-
316
-
317
-
318
-
319
-
320
-
321
-
322
-
323
- <span class="summary_desc"><div class='inline'></div></span>
324
-
325
- </li>
326
-
327
-
328
- <li class="public ">
329
- <span class="summary_signature">
330
-
331
- <a href="#frame-instance_method" title="#frame (instance method)">#<strong>frame</strong> &#x21d2; Puppeteer::Frame </a>
332
-
333
-
334
-
335
- </span>
336
-
337
-
338
-
339
-
340
-
341
-
342
-
343
-
344
-
345
- <span class="summary_desc"><div class='inline'></div></span>
346
-
347
- </li>
348
-
349
-
350
- <li class="public ">
351
- <span class="summary_signature">
352
-
353
- <a href="#initialize-instance_method" title="#initialize (instance method)">#<strong>initialize</strong>(client, context_payload, world) &#x21d2; ExecutionContext </a>
354
-
355
-
356
-
357
- </span>
358
-
359
-
360
- <span class="note title constructor">constructor</span>
361
-
362
-
363
-
364
-
365
-
366
-
367
-
368
-
369
- <span class="summary_desc"><div class='inline'>
370
- <p>A new instance of ExecutionContext.</p>
371
- </div></span>
372
-
373
- </li>
374
-
375
-
376
- </ul>
377
-
378
-
379
-
380
-
381
-
382
-
383
-
384
-
385
-
386
-
387
-
388
- <h3 class="inherited">Methods included from <span class='object_link'><a href="IfPresent.html" title="Puppeteer::IfPresent (module)">IfPresent</a></span></h3>
389
- <p class="inherited"><span class='object_link'><a href="IfPresent.html#if_present-instance_method" title="Puppeteer::IfPresent#if_present (method)">#if_present</a></span></p>
390
- <div id="constructor_details" class="method_details_list">
391
- <h2>Constructor Details</h2>
392
-
393
- <div class="method_details first">
394
- <h3 class="signature first" id="initialize-instance_method">
395
-
396
- #<strong>initialize</strong>(client, context_payload, world) &#x21d2; <tt><span class='object_link'><a href="" title="Puppeteer::ExecutionContext (class)">ExecutionContext</a></span></tt>
397
-
398
-
399
-
400
-
401
-
402
- </h3><div class="docstring">
403
- <div class="discussion">
404
-
405
- <p>Returns a new instance of ExecutionContext.</p>
406
-
407
-
408
- </div>
409
- </div>
410
- <div class="tags">
411
- <p class="tag_title">Parameters:</p>
412
- <ul class="param">
413
-
414
- <li>
415
-
416
- <span class='name'>client</span>
417
-
418
-
419
- <span class='type'>(<tt><span class='object_link'><a href="CDPSession.html" title="Puppeteer::CDPSession (class)">Puppeteer::CDPSession</a></span></tt>)</span>
420
-
421
-
422
-
423
- </li>
424
-
425
- <li>
426
-
427
- <span class='name'>context_payload</span>
428
-
429
-
430
- <span class='type'>(<tt>Hash</tt>)</span>
431
-
432
-
433
-
434
- </li>
435
-
436
- <li>
437
-
438
- <span class='name'>world</span>
439
-
440
-
441
- <span class='type'>(<tt><span class='object_link'><a href="DOMWorld.html" title="Puppeteer::DOMWorld (class)">Puppeteer::DOMWorld</a></span>?</tt>)</span>
442
-
443
-
444
-
445
- </li>
446
-
447
- </ul>
448
-
449
-
450
- </div><table class="source_code">
451
- <tr>
452
- <td>
453
- <pre class="lines">
454
-
455
-
456
- 11
457
- 12
458
- 13
459
- 14
460
- 15</pre>
461
- </td>
462
- <td>
463
- <pre class="code"><span class="info file"># File 'lib/puppeteer/execution_context.rb', line 11</span>
464
-
465
- <span class='kw'>def</span> <span class='id identifier rubyid_initialize'>initialize</span><span class='lparen'>(</span><span class='id identifier rubyid_client'>client</span><span class='comma'>,</span> <span class='id identifier rubyid_context_payload'>context_payload</span><span class='comma'>,</span> <span class='id identifier rubyid_world'>world</span><span class='rparen'>)</span>
466
- <span class='ivar'>@client</span> <span class='op'>=</span> <span class='id identifier rubyid_client'>client</span>
467
- <span class='ivar'>@world</span> <span class='op'>=</span> <span class='id identifier rubyid_world'>world</span>
468
- <span class='ivar'>@context_id</span> <span class='op'>=</span> <span class='id identifier rubyid_context_payload'>context_payload</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>id</span><span class='tstring_end'>&#39;</span></span><span class='rbracket'>]</span>
469
- <span class='kw'>end</span></pre>
470
- </td>
471
- </tr>
472
- </table>
473
- </div>
474
-
475
- </div>
476
-
477
- <div id="instance_attr_details" class="attr_details">
478
- <h2>Instance Attribute Details</h2>
479
-
480
-
481
- <span id=""></span>
482
- <div class="method_details first">
483
- <h3 class="signature first" id="client-instance_method">
484
-
485
- #<strong>client</strong> &#x21d2; <tt>Object</tt> <span class="extras">(readonly)</span>
486
-
487
-
488
-
489
-
490
-
491
- </h3><div class="docstring">
492
- <div class="discussion">
493
-
494
- <p>Returns the value of attribute client.</p>
495
-
496
-
497
- </div>
498
- </div>
499
- <div class="tags">
500
-
501
-
502
- </div><table class="source_code">
503
- <tr>
504
- <td>
505
- <pre class="lines">
506
-
507
-
508
- 17
509
- 18
510
- 19</pre>
511
- </td>
512
- <td>
513
- <pre class="code"><span class="info file"># File 'lib/puppeteer/execution_context.rb', line 17</span>
514
-
515
- <span class='kw'>def</span> <span class='id identifier rubyid_client'>client</span>
516
- <span class='ivar'>@client</span>
517
- <span class='kw'>end</span></pre>
518
- </td>
519
- </tr>
520
- </table>
521
- </div>
522
-
523
-
524
- <span id=""></span>
525
- <div class="method_details ">
526
- <h3 class="signature " id="world-instance_method">
527
-
528
- #<strong>world</strong> &#x21d2; <tt>Object</tt> <span class="extras">(readonly)</span>
529
-
530
-
531
-
532
-
533
-
534
- </h3><div class="docstring">
535
- <div class="discussion">
536
-
537
- <p>Returns the value of attribute world.</p>
538
-
539
-
540
- </div>
541
- </div>
542
- <div class="tags">
543
-
544
-
545
- </div><table class="source_code">
546
- <tr>
547
- <td>
548
- <pre class="lines">
549
-
550
-
551
- 17
552
- 18
553
- 19</pre>
554
- </td>
555
- <td>
556
- <pre class="code"><span class="info file"># File 'lib/puppeteer/execution_context.rb', line 17</span>
557
-
558
- <span class='kw'>def</span> <span class='id identifier rubyid_world'>world</span>
559
- <span class='ivar'>@world</span>
560
- <span class='kw'>end</span></pre>
561
- </td>
562
- </tr>
563
- </table>
564
- </div>
565
-
566
- </div>
567
-
568
-
569
- <div id="instance_method_details" class="method_details_list">
570
- <h2>Instance Method Details</h2>
571
-
572
-
573
- <div class="method_details first">
574
- <h3 class="signature first" id="_context_id-instance_method">
575
-
576
- #<strong>_context_id</strong> &#x21d2; <tt>Object</tt>
577
-
578
-
579
-
580
-
581
-
582
- </h3><div class="docstring">
583
- <div class="discussion">
584
-
585
- <p>only used in DomWorld#delete_context</p>
586
-
587
-
588
- </div>
589
- </div>
590
- <div class="tags">
591
-
592
-
593
- </div><table class="source_code">
594
- <tr>
595
- <td>
596
- <pre class="lines">
597
-
598
-
599
- 20
600
- 21
601
- 22</pre>
602
- </td>
603
- <td>
604
- <pre class="code"><span class="info file"># File 'lib/puppeteer/execution_context.rb', line 20</span>
605
-
606
- <span class='kw'>def</span> <span class='id identifier rubyid__context_id'>_context_id</span>
607
- <span class='ivar'>@context_id</span>
608
- <span class='kw'>end</span></pre>
609
- </td>
610
- </tr>
611
- </table>
612
- </div>
613
-
614
- <div class="method_details ">
615
- <h3 class="signature " id="adopt_backend_node_id-instance_method">
616
-
617
- #<strong>adopt_backend_node_id</strong>(backend_node_id) &#x21d2; <tt><span class='object_link'><a href="ElementHandle.html" title="Puppeteer::ElementHandle (class)">Puppeteer::ElementHandle</a></span></tt>
618
-
619
-
620
-
621
-
622
-
623
- </h3><div class="docstring">
624
- <div class="discussion">
625
-
626
-
627
- </div>
628
- </div>
629
- <div class="tags">
630
- <p class="tag_title">Parameters:</p>
631
- <ul class="param">
632
-
633
- <li>
634
-
635
- <span class='name'>backend_node_id</span>
636
-
637
-
638
- <span class='type'>(<tt>Integer</tt>)</span>
639
-
640
-
641
-
642
- </li>
643
-
644
- </ul>
645
-
646
- <p class="tag_title">Returns:</p>
647
- <ul class="return">
648
-
649
- <li>
650
-
651
-
652
- <span class='type'>(<tt><span class='object_link'><a href="ElementHandle.html" title="Puppeteer::ElementHandle (class)">Puppeteer::ElementHandle</a></span></tt>)</span>
653
-
654
-
655
-
656
- </li>
657
-
658
- </ul>
659
-
660
- </div><table class="source_code">
661
- <tr>
662
- <td>
663
- <pre class="lines">
664
-
665
-
666
- 221
667
- 222
668
- 223
669
- 224
670
- 225
671
- 226
672
- 227
673
- 228
674
- 229
675
- 230</pre>
676
- </td>
677
- <td>
678
- <pre class="code"><span class="info file"># File 'lib/puppeteer/execution_context.rb', line 221</span>
679
-
680
- <span class='kw'>def</span> <span class='id identifier rubyid_adopt_backend_node_id'>adopt_backend_node_id</span><span class='lparen'>(</span><span class='id identifier rubyid_backend_node_id'>backend_node_id</span><span class='rparen'>)</span>
681
- <span class='id identifier rubyid_response'>response</span> <span class='op'>=</span> <span class='ivar'>@client</span><span class='period'>.</span><span class='id identifier rubyid_send_message'>send_message</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>DOM.resolveNode</span><span class='tstring_end'>&#39;</span></span><span class='comma'>,</span>
682
- <span class='label'>backendNodeId:</span> <span class='id identifier rubyid_backend_node_id'>backend_node_id</span><span class='comma'>,</span>
683
- <span class='label'>executionContextId:</span> <span class='ivar'>@context_id</span><span class='comma'>,</span>
684
- <span class='rparen'>)</span>
685
- <span class='const'><span class='object_link'><a href="../Puppeteer.html" title="Puppeteer (class)">Puppeteer</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="JSHandle.html" title="Puppeteer::JSHandle (class)">JSHandle</a></span></span><span class='period'>.</span><span class='id identifier rubyid_create'><span class='object_link'><a href="JSHandle.html#create-class_method" title="Puppeteer::JSHandle.create (method)">create</a></span></span><span class='lparen'>(</span>
686
- <span class='label'>context:</span> <span class='kw'>self</span><span class='comma'>,</span>
687
- <span class='label'>remote_object:</span> <span class='const'><span class='object_link'><a href="../Puppeteer.html" title="Puppeteer (class)">Puppeteer</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="RemoteObject.html" title="Puppeteer::RemoteObject (class)">RemoteObject</a></span></span><span class='period'>.</span><span class='id identifier rubyid_new'><span class='object_link'><a href="RemoteObject.html#initialize-instance_method" title="Puppeteer::RemoteObject#initialize (method)">new</a></span></span><span class='lparen'>(</span><span class='id identifier rubyid_response'>response</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>object</span><span class='tstring_end'>&quot;</span></span><span class='rbracket'>]</span><span class='rparen'>)</span><span class='comma'>,</span>
688
- <span class='rparen'>)</span>
689
- <span class='kw'>end</span></pre>
690
- </td>
691
- </tr>
692
- </table>
693
- </div>
694
-
695
- <div class="method_details ">
696
- <h3 class="signature " id="adopt_element_handle-instance_method">
697
-
698
- #<strong>adopt_element_handle</strong>(element_handle) &#x21d2; <tt><span class='object_link'><a href="ElementHandle.html" title="Puppeteer::ElementHandle (class)">Puppeteer::ElementHandle</a></span></tt>
699
-
700
-
701
-
702
-
703
-
704
- </h3><div class="docstring">
705
- <div class="discussion">
706
-
707
-
708
- </div>
709
- </div>
710
- <div class="tags">
711
- <p class="tag_title">Parameters:</p>
712
- <ul class="param">
713
-
714
- <li>
715
-
716
- <span class='name'>element_handle</span>
717
-
718
-
719
- <span class='type'>(<tt><span class='object_link'><a href="ElementHandle.html" title="Puppeteer::ElementHandle (class)">Puppeteer::ElementHandle</a></span></tt>)</span>
720
-
721
-
722
-
723
- </li>
724
-
725
- </ul>
726
-
727
- <p class="tag_title">Returns:</p>
728
- <ul class="return">
729
-
730
- <li>
731
-
732
-
733
- <span class='type'>(<tt><span class='object_link'><a href="ElementHandle.html" title="Puppeteer::ElementHandle (class)">Puppeteer::ElementHandle</a></span></tt>)</span>
734
-
735
-
736
-
737
- </li>
738
-
739
- </ul>
740
-
741
- </div><table class="source_code">
742
- <tr>
743
- <td>
744
- <pre class="lines">
745
-
746
-
747
- 234
748
- 235
749
- 236
750
- 237
751
- 238
752
- 239
753
- 240
754
- 241
755
- 242
756
- 243
757
- 244
758
- 245
759
- 246
760
- 247
761
- 248
762
- 249
763
- 250
764
- 251
765
- 252
766
- 253</pre>
767
- </td>
768
- <td>
769
- <pre class="code"><span class="info file"># File 'lib/puppeteer/execution_context.rb', line 234</span>
770
-
771
- <span class='kw'>def</span> <span class='id identifier rubyid_adopt_element_handle'>adopt_element_handle</span><span class='lparen'>(</span><span class='id identifier rubyid_element_handle'>element_handle</span><span class='rparen'>)</span>
772
- <span class='kw'>if</span> <span class='id identifier rubyid_element_handle'>element_handle</span><span class='period'>.</span><span class='id identifier rubyid_execution_context'>execution_context</span> <span class='op'>==</span> <span class='kw'>self</span>
773
- <span class='id identifier rubyid_raise'>raise</span> <span class='const'>ArgumentError</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>Cannot adopt handle that already belongs to this execution context</span><span class='tstring_end'>&#39;</span></span><span class='rparen'>)</span>
774
- <span class='kw'>end</span>
775
-
776
- <span class='kw'>unless</span> <span class='ivar'>@world</span>
777
- <span class='id identifier rubyid_raise'>raise</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>Cannot adopt handle without DOMWorld</span><span class='tstring_end'>&#39;</span></span>
778
- <span class='kw'>end</span>
779
-
780
- <span class='id identifier rubyid_node_info'>node_info</span> <span class='op'>=</span> <span class='id identifier rubyid_element_handle'>element_handle</span><span class='period'>.</span><span class='id identifier rubyid_remote_object'>remote_object</span><span class='period'>.</span><span class='id identifier rubyid_node_info'>node_info</span><span class='lparen'>(</span><span class='ivar'>@client</span><span class='rparen'>)</span>
781
- <span class='id identifier rubyid_response'>response</span> <span class='op'>=</span> <span class='ivar'>@client</span><span class='period'>.</span><span class='id identifier rubyid_send_message'>send_message</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>DOM.resolveNode</span><span class='tstring_end'>&#39;</span></span><span class='comma'>,</span>
782
- <span class='label'>backendNodeId:</span> <span class='id identifier rubyid_node_info'>node_info</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>node</span><span class='tstring_end'>&quot;</span></span><span class='rbracket'>]</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>backendNodeId</span><span class='tstring_end'>&quot;</span></span><span class='rbracket'>]</span><span class='comma'>,</span>
783
- <span class='label'>executionContextId:</span> <span class='ivar'>@context_id</span><span class='comma'>,</span>
784
- <span class='rparen'>)</span>
785
-
786
- <span class='const'><span class='object_link'><a href="../Puppeteer.html" title="Puppeteer (class)">Puppeteer</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="JSHandle.html" title="Puppeteer::JSHandle (class)">JSHandle</a></span></span><span class='period'>.</span><span class='id identifier rubyid_create'><span class='object_link'><a href="JSHandle.html#create-class_method" title="Puppeteer::JSHandle.create (method)">create</a></span></span><span class='lparen'>(</span>
787
- <span class='label'>context:</span> <span class='kw'>self</span><span class='comma'>,</span>
788
- <span class='label'>remote_object:</span> <span class='const'><span class='object_link'><a href="../Puppeteer.html" title="Puppeteer (class)">Puppeteer</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="RemoteObject.html" title="Puppeteer::RemoteObject (class)">RemoteObject</a></span></span><span class='period'>.</span><span class='id identifier rubyid_new'><span class='object_link'><a href="RemoteObject.html#initialize-instance_method" title="Puppeteer::RemoteObject#initialize (method)">new</a></span></span><span class='lparen'>(</span><span class='id identifier rubyid_response'>response</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>object</span><span class='tstring_end'>&quot;</span></span><span class='rbracket'>]</span><span class='rparen'>)</span><span class='comma'>,</span>
789
- <span class='rparen'>)</span>
790
- <span class='kw'>end</span></pre>
791
- </td>
792
- </tr>
793
- </table>
794
- </div>
795
-
796
- <div class="method_details ">
797
- <h3 class="signature " id="evaluate-instance_method">
798
-
799
- #<strong>evaluate</strong>(page_function, *args) &#x21d2; <tt>Object</tt>
800
-
801
-
802
-
803
-
804
-
805
- </h3><div class="docstring">
806
- <div class="discussion">
807
-
808
-
809
- </div>
810
- </div>
811
- <div class="tags">
812
- <p class="tag_title">Parameters:</p>
813
- <ul class="param">
814
-
815
- <li>
816
-
817
- <span class='name'>page_function</span>
818
-
819
-
820
- <span class='type'>(<tt>String</tt>)</span>
821
-
822
-
823
-
824
- </li>
825
-
826
- </ul>
827
-
828
- <p class="tag_title">Returns:</p>
829
- <ul class="return">
830
-
831
- <li>
832
-
833
-
834
- <span class='type'>(<tt>Object</tt>)</span>
835
-
836
-
837
-
838
- </li>
839
-
840
- </ul>
841
-
842
- </div><table class="source_code">
843
- <tr>
844
- <td>
845
- <pre class="lines">
846
-
847
-
848
- 33
849
- 34
850
- 35</pre>
851
- </td>
852
- <td>
853
- <pre class="code"><span class="info file"># File 'lib/puppeteer/execution_context.rb', line 33</span>
854
-
855
- <span class='kw'>def</span> <span class='id identifier rubyid_evaluate'>evaluate</span><span class='lparen'>(</span><span class='id identifier rubyid_page_function'>page_function</span><span class='comma'>,</span> <span class='op'>*</span><span class='id identifier rubyid_args'>args</span><span class='rparen'>)</span>
856
- <span class='id identifier rubyid_evaluate_internal'>evaluate_internal</span><span class='lparen'>(</span><span class='kw'>true</span><span class='comma'>,</span> <span class='id identifier rubyid_page_function'>page_function</span><span class='comma'>,</span> <span class='op'>*</span><span class='id identifier rubyid_args'>args</span><span class='rparen'>)</span>
857
- <span class='kw'>end</span></pre>
858
- </td>
859
- </tr>
860
- </table>
861
- </div>
862
-
863
- <div class="method_details ">
864
- <h3 class="signature " id="evaluate_handle-instance_method">
865
-
866
- #<strong>evaluate_handle</strong>(page_function, *args) &#x21d2; <tt><span class='object_link'><a href="JSHandle.html" title="Puppeteer::JSHandle (class)">Puppeteer::JSHandle</a></span></tt>
867
-
868
-
869
-
870
-
871
-
872
- </h3><div class="docstring">
873
- <div class="discussion">
874
-
875
-
876
- </div>
877
- </div>
878
- <div class="tags">
879
- <p class="tag_title">Parameters:</p>
880
- <ul class="param">
881
-
882
- <li>
883
-
884
- <span class='name'>page_function</span>
885
-
886
-
887
- <span class='type'>(<tt>String</tt>)</span>
888
-
889
-
890
-
891
- </li>
892
-
893
- </ul>
894
-
895
- <p class="tag_title">Returns:</p>
896
- <ul class="return">
897
-
898
- <li>
899
-
900
-
901
- <span class='type'>(<tt><span class='object_link'><a href="JSHandle.html" title="Puppeteer::JSHandle (class)">Puppeteer::JSHandle</a></span></tt>)</span>
902
-
903
-
904
-
905
- </li>
906
-
907
- </ul>
908
-
909
- </div><table class="source_code">
910
- <tr>
911
- <td>
912
- <pre class="lines">
913
-
914
-
915
- 39
916
- 40
917
- 41</pre>
918
- </td>
919
- <td>
920
- <pre class="code"><span class="info file"># File 'lib/puppeteer/execution_context.rb', line 39</span>
921
-
922
- <span class='kw'>def</span> <span class='id identifier rubyid_evaluate_handle'>evaluate_handle</span><span class='lparen'>(</span><span class='id identifier rubyid_page_function'>page_function</span><span class='comma'>,</span> <span class='op'>*</span><span class='id identifier rubyid_args'>args</span><span class='rparen'>)</span>
923
- <span class='id identifier rubyid_evaluate_internal'>evaluate_internal</span><span class='lparen'>(</span><span class='kw'>false</span><span class='comma'>,</span> <span class='id identifier rubyid_page_function'>page_function</span><span class='comma'>,</span> <span class='op'>*</span><span class='id identifier rubyid_args'>args</span><span class='rparen'>)</span>
924
- <span class='kw'>end</span></pre>
925
- </td>
926
- </tr>
927
- </table>
928
- </div>
929
-
930
- <div class="method_details ">
931
- <h3 class="signature " id="frame-instance_method">
932
-
933
- #<strong>frame</strong> &#x21d2; <tt><span class='object_link'><a href="Frame.html" title="Puppeteer::Frame (class)">Puppeteer::Frame</a></span></tt>
934
-
935
-
936
-
937
-
938
-
939
- </h3><div class="docstring">
940
- <div class="discussion">
941
-
942
-
943
- </div>
944
- </div>
945
- <div class="tags">
946
-
947
- <p class="tag_title">Returns:</p>
948
- <ul class="return">
949
-
950
- <li>
951
-
952
-
953
- <span class='type'>(<tt><span class='object_link'><a href="Frame.html" title="Puppeteer::Frame (class)">Puppeteer::Frame</a></span></tt>)</span>
954
-
955
-
956
-
957
- </li>
958
-
959
- </ul>
960
-
961
- </div><table class="source_code">
962
- <tr>
963
- <td>
964
- <pre class="lines">
965
-
966
-
967
- 25
968
- 26
969
- 27
970
- 28
971
- 29</pre>
972
- </td>
973
- <td>
974
- <pre class="code"><span class="info file"># File 'lib/puppeteer/execution_context.rb', line 25</span>
975
-
976
- <span class='kw'>def</span> <span class='id identifier rubyid_frame'>frame</span>
977
- <span class='id identifier rubyid_if_present'>if_present</span><span class='lparen'>(</span><span class='ivar'>@world</span><span class='rparen'>)</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_world'>world</span><span class='op'>|</span>
978
- <span class='id identifier rubyid_world'>world</span><span class='period'>.</span><span class='id identifier rubyid_frame'>frame</span>
979
- <span class='kw'>end</span>
980
- <span class='kw'>end</span></pre>
981
- </td>
982
- </tr>
983
- </table>
984
- </div>
985
-
986
- </div>
987
-
988
- </div>
989
-
990
- <div id="footer">
991
- Generated on Wed Jun 24 03:08:01 2020 by
992
- <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
993
- 0.9.24 (ruby-2.6.3).
994
- </div>
995
-
996
- </div>
997
- </body>
998
- </html>