puppeteer-ruby 0.0.11 → 0.0.16

Sign up to get free protection for your applications and to get access to all the features.
Files changed (138) hide show
  1. checksums.yaml +4 -4
  2. data/.circleci/config.yml +0 -12
  3. data/.github/workflows/docs.yml +45 -0
  4. data/.github/workflows/reviewdog.yml +15 -0
  5. data/README.md +54 -1
  6. data/lib/puppeteer.rb +39 -13
  7. data/lib/puppeteer/browser.rb +22 -25
  8. data/lib/puppeteer/cdp_session.rb +3 -19
  9. data/lib/puppeteer/concurrent_ruby_utils.rb +12 -2
  10. data/lib/puppeteer/connection.rb +3 -15
  11. data/lib/puppeteer/define_async_method.rb +23 -0
  12. data/lib/puppeteer/dom_world.rb +51 -65
  13. data/lib/puppeteer/element_handle.rb +15 -44
  14. data/lib/puppeteer/emulation_manager.rb +2 -6
  15. data/lib/puppeteer/event_callbackable.rb +11 -0
  16. data/lib/puppeteer/execution_context.rb +1 -6
  17. data/lib/puppeteer/frame.rb +34 -39
  18. data/lib/puppeteer/frame_manager.rb +7 -25
  19. data/lib/puppeteer/js_handle.rb +3 -12
  20. data/lib/puppeteer/keyboard.rb +6 -27
  21. data/lib/puppeteer/launcher.rb +6 -6
  22. data/lib/puppeteer/launcher/chrome.rb +10 -8
  23. data/lib/puppeteer/mouse.rb +5 -25
  24. data/lib/puppeteer/network_manager.rb +163 -5
  25. data/lib/puppeteer/page.rb +230 -177
  26. data/lib/puppeteer/page/pdf_options.rb +166 -0
  27. data/lib/puppeteer/remote_object.rb +2 -5
  28. data/lib/puppeteer/request.rb +336 -0
  29. data/lib/puppeteer/response.rb +113 -0
  30. data/lib/puppeteer/target.rb +1 -1
  31. data/lib/puppeteer/touch_screen.rb +2 -7
  32. data/lib/puppeteer/version.rb +1 -1
  33. data/lib/puppeteer/wait_task.rb +2 -4
  34. data/lib/puppeteer/web_socket_transport.rb +8 -8
  35. data/puppeteer-ruby.gemspec +1 -1
  36. data/puppeteer-ruby.png +0 -0
  37. metadata +11 -105
  38. data/Dockerfile +0 -6
  39. data/docker-compose.yml +0 -15
  40. data/docs/Puppeteer.html +0 -2020
  41. data/docs/Puppeteer/AsyncAwaitBehavior.html +0 -105
  42. data/docs/Puppeteer/Browser.html +0 -2258
  43. data/docs/Puppeteer/BrowserContext.html +0 -809
  44. data/docs/Puppeteer/BrowserFetcher.html +0 -214
  45. data/docs/Puppeteer/BrowserRunner.html +0 -914
  46. data/docs/Puppeteer/BrowserRunner/BrowserProcess.html +0 -477
  47. data/docs/Puppeteer/CDPSession.html +0 -813
  48. data/docs/Puppeteer/CDPSession/Error.html +0 -124
  49. data/docs/Puppeteer/ConcurrentRubyUtils.html +0 -430
  50. data/docs/Puppeteer/Connection.html +0 -964
  51. data/docs/Puppeteer/Connection/MessageCallback.html +0 -434
  52. data/docs/Puppeteer/Connection/ProtocolError.html +0 -216
  53. data/docs/Puppeteer/Connection/RequestDebugPrinter.html +0 -217
  54. data/docs/Puppeteer/Connection/ResponseDebugPrinter.html +0 -244
  55. data/docs/Puppeteer/ConsoleMessage.html +0 -565
  56. data/docs/Puppeteer/ConsoleMessage/Location.html +0 -433
  57. data/docs/Puppeteer/DOMWorld.html +0 -2219
  58. data/docs/Puppeteer/DOMWorld/DetachedError.html +0 -124
  59. data/docs/Puppeteer/DOMWorld/DocumentEvaluationError.html +0 -124
  60. data/docs/Puppeteer/DebugPrint.html +0 -233
  61. data/docs/Puppeteer/Device.html +0 -470
  62. data/docs/Puppeteer/Devices.html +0 -139
  63. data/docs/Puppeteer/ElementHandle.html +0 -2542
  64. data/docs/Puppeteer/ElementHandle/BoundingBox.html +0 -507
  65. data/docs/Puppeteer/ElementHandle/BoxModel.html +0 -404
  66. data/docs/Puppeteer/ElementHandle/ElementNotFoundError.html +0 -206
  67. data/docs/Puppeteer/ElementHandle/ElementNotVisibleError.html +0 -206
  68. data/docs/Puppeteer/ElementHandle/Point.html +0 -492
  69. data/docs/Puppeteer/ElementHandle/ScrollIntoViewError.html +0 -124
  70. data/docs/Puppeteer/EmulationManager.html +0 -454
  71. data/docs/Puppeteer/EventCallbackable.html +0 -433
  72. data/docs/Puppeteer/EventCallbackable/EventListeners.html +0 -435
  73. data/docs/Puppeteer/ExecutionContext.html +0 -998
  74. data/docs/Puppeteer/ExecutionContext/EvaluationError.html +0 -124
  75. data/docs/Puppeteer/ExecutionContext/JavaScriptExpression.html +0 -357
  76. data/docs/Puppeteer/ExecutionContext/JavaScriptFunction.html +0 -389
  77. data/docs/Puppeteer/FileChooser.html +0 -455
  78. data/docs/Puppeteer/Frame.html +0 -3813
  79. data/docs/Puppeteer/FrameManager.html +0 -2410
  80. data/docs/Puppeteer/FrameManager/NavigationError.html +0 -124
  81. data/docs/Puppeteer/IfPresent.html +0 -222
  82. data/docs/Puppeteer/JSHandle.html +0 -1352
  83. data/docs/Puppeteer/Keyboard.html +0 -1557
  84. data/docs/Puppeteer/Keyboard/KeyDefinition.html +0 -831
  85. data/docs/Puppeteer/Keyboard/KeyDescription.html +0 -603
  86. data/docs/Puppeteer/Launcher.html +0 -237
  87. data/docs/Puppeteer/Launcher/Base.html +0 -385
  88. data/docs/Puppeteer/Launcher/Base/ExecutablePathNotFound.html +0 -124
  89. data/docs/Puppeteer/Launcher/BrowserOptions.html +0 -441
  90. data/docs/Puppeteer/Launcher/Chrome.html +0 -669
  91. data/docs/Puppeteer/Launcher/Chrome/DefaultArgs.html +0 -382
  92. data/docs/Puppeteer/Launcher/ChromeArgOptions.html +0 -531
  93. data/docs/Puppeteer/Launcher/LaunchOptions.html +0 -893
  94. data/docs/Puppeteer/LifecycleWatcher.html +0 -834
  95. data/docs/Puppeteer/LifecycleWatcher/ExpectedLifecycle.html +0 -363
  96. data/docs/Puppeteer/LifecycleWatcher/FrameDetachedError.html +0 -206
  97. data/docs/Puppeteer/LifecycleWatcher/TerminatedError.html +0 -124
  98. data/docs/Puppeteer/Mouse.html +0 -1095
  99. data/docs/Puppeteer/Mouse/Button.html +0 -136
  100. data/docs/Puppeteer/NetworkManager.html +0 -901
  101. data/docs/Puppeteer/NetworkManager/Credentials.html +0 -385
  102. data/docs/Puppeteer/Page.html +0 -5970
  103. data/docs/Puppeteer/Page/FileChooserTimeoutError.html +0 -206
  104. data/docs/Puppeteer/Page/ScreenshotOptions.html +0 -845
  105. data/docs/Puppeteer/Page/ScriptTag.html +0 -555
  106. data/docs/Puppeteer/Page/StyleTag.html +0 -448
  107. data/docs/Puppeteer/Page/TargetCrashedError.html +0 -124
  108. data/docs/Puppeteer/RemoteObject.html +0 -1087
  109. data/docs/Puppeteer/Target.html +0 -1336
  110. data/docs/Puppeteer/Target/InitializeFailure.html +0 -124
  111. data/docs/Puppeteer/Target/TargetInfo.html +0 -729
  112. data/docs/Puppeteer/TimeoutError.html +0 -135
  113. data/docs/Puppeteer/TimeoutSettings.html +0 -496
  114. data/docs/Puppeteer/TouchScreen.html +0 -464
  115. data/docs/Puppeteer/Viewport.html +0 -837
  116. data/docs/Puppeteer/WaitTask.html +0 -637
  117. data/docs/Puppeteer/WaitTask/TerminatedError.html +0 -124
  118. data/docs/Puppeteer/WaitTask/TimeoutError.html +0 -206
  119. data/docs/Puppeteer/WebSocket.html +0 -673
  120. data/docs/Puppeteer/WebSocket/DriverImpl.html +0 -412
  121. data/docs/Puppeteer/WebSocket/TransportError.html +0 -124
  122. data/docs/Puppeteer/WebSocketTransport.html +0 -600
  123. data/docs/Puppeteer/WebSocktTransportError.html +0 -124
  124. data/docs/_index.html +0 -816
  125. data/docs/class_list.html +0 -51
  126. data/docs/css/common.css +0 -1
  127. data/docs/css/full_list.css +0 -58
  128. data/docs/css/style.css +0 -496
  129. data/docs/file.README.html +0 -123
  130. data/docs/file_list.html +0 -56
  131. data/docs/frames.html +0 -17
  132. data/docs/index.html +0 -123
  133. data/docs/js/app.js +0 -314
  134. data/docs/js/full_list.js +0 -216
  135. data/docs/js/jquery.js +0 -4
  136. data/docs/method_list.html +0 -4091
  137. data/docs/top-level-namespace.html +0 -126
  138. data/lib/puppeteer/async_await_behavior.rb +0 -38
@@ -1,124 +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
- Exception: Puppeteer::ElementHandle::ScrollIntoViewError
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::ElementHandle::ScrollIntoViewError";
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 (S)</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="../ElementHandle.html" title="Puppeteer::ElementHandle (class)">ElementHandle</a></span></span>
41
- &raquo;
42
- <span class="title">ScrollIntoViewError</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>Exception: Puppeteer::ElementHandle::ScrollIntoViewError
63
-
64
-
65
-
66
- </h1>
67
- <div class="box_info">
68
-
69
- <dl>
70
- <dt>Inherits:</dt>
71
- <dd>
72
- <span class="inheritName">StandardError</span>
73
-
74
- <ul class="fullTree">
75
- <li>Object</li>
76
-
77
- <li class="next">StandardError</li>
78
-
79
- <li class="next">Puppeteer::ElementHandle::ScrollIntoViewError</li>
80
-
81
- </ul>
82
- <a href="#" class="inheritanceTree">show all</a>
83
-
84
- </dd>
85
- </dl>
86
-
87
-
88
-
89
-
90
-
91
-
92
-
93
-
94
-
95
-
96
-
97
- <dl>
98
- <dt>Defined in:</dt>
99
- <dd>lib/puppeteer/element_handle.rb</dd>
100
- </dl>
101
-
102
- </div>
103
-
104
-
105
-
106
-
107
-
108
-
109
-
110
-
111
-
112
-
113
-
114
- </div>
115
-
116
- <div id="footer">
117
- Generated on Sat Jun 20 17:15:07 2020 by
118
- <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
119
- 0.9.24 (ruby-2.6.3).
120
- </div>
121
-
122
- </div>
123
- </body>
124
- </html>
@@ -1,454 +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::EmulationManager
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::EmulationManager";
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">EmulationManager</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::EmulationManager
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::EmulationManager</li>
78
-
79
- </ul>
80
- <a href="#" class="inheritanceTree">show all</a>
81
-
82
- </dd>
83
- </dl>
84
-
85
-
86
-
87
-
88
-
89
-
90
-
91
-
92
-
93
-
94
-
95
- <dl>
96
- <dt>Defined in:</dt>
97
- <dd>lib/puppeteer/emulation_manager.rb</dd>
98
- </dl>
99
-
100
- </div>
101
-
102
-
103
-
104
-
105
-
106
-
107
-
108
-
109
-
110
- <h2>
111
- Instance Method Summary
112
- <small><a href="#" class="summary_toggle">collapse</a></small>
113
- </h2>
114
-
115
- <ul class="summary">
116
-
117
- <li class="public ">
118
- <span class="summary_signature">
119
-
120
- <a href="#async_emulate_viewport-instance_method" title="#async_emulate_viewport (instance method)">#<strong>async_emulate_viewport</strong> &#x21d2; Future&lt;true|false&gt; </a>
121
-
122
-
123
-
124
- </span>
125
-
126
-
127
-
128
-
129
-
130
-
131
-
132
-
133
-
134
- <span class="summary_desc"><div class='inline'></div></span>
135
-
136
- </li>
137
-
138
-
139
- <li class="public ">
140
- <span class="summary_signature">
141
-
142
- <a href="#emulate_viewport-instance_method" title="#emulate_viewport (instance method)">#<strong>emulate_viewport</strong>(viewport) &#x21d2; true|false </a>
143
-
144
-
145
-
146
- </span>
147
-
148
-
149
-
150
-
151
-
152
-
153
-
154
-
155
-
156
- <span class="summary_desc"><div class='inline'></div></span>
157
-
158
- </li>
159
-
160
-
161
- <li class="public ">
162
- <span class="summary_signature">
163
-
164
- <a href="#initialize-instance_method" title="#initialize (instance method)">#<strong>initialize</strong>(client) &#x21d2; EmulationManager </a>
165
-
166
-
167
-
168
- </span>
169
-
170
-
171
- <span class="note title constructor">constructor</span>
172
-
173
-
174
-
175
-
176
-
177
-
178
-
179
-
180
- <span class="summary_desc"><div class='inline'>
181
- <p>A new instance of EmulationManager.</p>
182
- </div></span>
183
-
184
- </li>
185
-
186
-
187
- </ul>
188
-
189
-
190
- <div id="constructor_details" class="method_details_list">
191
- <h2>Constructor Details</h2>
192
-
193
- <div class="method_details first">
194
- <h3 class="signature first" id="initialize-instance_method">
195
-
196
- #<strong>initialize</strong>(client) &#x21d2; <tt><span class='object_link'><a href="" title="Puppeteer::EmulationManager (class)">EmulationManager</a></span></tt>
197
-
198
-
199
-
200
-
201
-
202
- </h3><div class="docstring">
203
- <div class="discussion">
204
-
205
- <p>Returns a new instance of EmulationManager.</p>
206
-
207
-
208
- </div>
209
- </div>
210
- <div class="tags">
211
- <p class="tag_title">Parameters:</p>
212
- <ul class="param">
213
-
214
- <li>
215
-
216
- <span class='name'>client</span>
217
-
218
-
219
- <span class='type'>(<tt>!<span class='object_link'><a href="../Puppeteer.html" title="Puppeteer (class)">Puppeteer</a></span>.<span class='object_link'><a href="CDPSession.html" title="Puppeteer::CDPSession (class)">CDPSession</a></span></tt>)</span>
220
-
221
-
222
-
223
- </li>
224
-
225
- </ul>
226
-
227
-
228
- </div><table class="source_code">
229
- <tr>
230
- <td>
231
- <pre class="lines">
232
-
233
-
234
- 5
235
- 6
236
- 7
237
- 8
238
- 9</pre>
239
- </td>
240
- <td>
241
- <pre class="code"><span class="info file"># File 'lib/puppeteer/emulation_manager.rb', line 5</span>
242
-
243
- <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='rparen'>)</span>
244
- <span class='ivar'>@client</span> <span class='op'>=</span> <span class='id identifier rubyid_client'>client</span>
245
- <span class='ivar'>@emulating_mobile</span> <span class='op'>=</span> <span class='kw'>false</span>
246
- <span class='ivar'>@has_touch</span> <span class='op'>=</span> <span class='kw'>false</span>
247
- <span class='kw'>end</span></pre>
248
- </td>
249
- </tr>
250
- </table>
251
- </div>
252
-
253
- </div>
254
-
255
-
256
- <div id="instance_method_details" class="method_details_list">
257
- <h2>Instance Method Details</h2>
258
-
259
-
260
- <div class="method_details first">
261
- <h3 class="signature first" id="async_emulate_viewport-instance_method">
262
-
263
- #<strong>async_emulate_viewport</strong> &#x21d2; <tt>Future&lt;true|false&gt;</tt>
264
-
265
-
266
-
267
-
268
-
269
- </h3><div class="docstring">
270
- <div class="discussion">
271
-
272
-
273
- </div>
274
- </div>
275
- <div class="tags">
276
- <p class="tag_title">Parameters:</p>
277
- <ul class="param">
278
-
279
- <li>
280
-
281
- <span class='name'>viewport</span>
282
-
283
-
284
- <span class='type'>(<tt><span class='object_link'><a href="Viewport.html" title="Puppeteer::Viewport (class)">Puppeteer::Viewport</a></span></tt>)</span>
285
-
286
-
287
-
288
- </li>
289
-
290
- </ul>
291
-
292
- <p class="tag_title">Returns:</p>
293
- <ul class="return">
294
-
295
- <li>
296
-
297
-
298
- <span class='type'>(<tt>Future&lt;true|false&gt;</tt>)</span>
299
-
300
-
301
-
302
- </li>
303
-
304
- </ul>
305
-
306
- </div><table class="source_code">
307
- <tr>
308
- <td>
309
- <pre class="lines">
310
-
311
-
312
- 43
313
- 44
314
- 45</pre>
315
- </td>
316
- <td>
317
- <pre class="code"><span class="info file"># File 'lib/puppeteer/emulation_manager.rb', line 43</span>
318
-
319
- <span class='id identifier rubyid_async'>async</span> <span class='kw'>def</span> <span class='id identifier rubyid_async_emulate_viewport'>async_emulate_viewport</span><span class='lparen'>(</span><span class='id identifier rubyid_viewport'>viewport</span><span class='rparen'>)</span>
320
- <span class='id identifier rubyid_emulate_viewport'>emulate_viewport</span><span class='lparen'>(</span><span class='id identifier rubyid_viewport'>viewport</span><span class='rparen'>)</span>
321
- <span class='kw'>end</span></pre>
322
- </td>
323
- </tr>
324
- </table>
325
- </div>
326
-
327
- <div class="method_details ">
328
- <h3 class="signature " id="emulate_viewport-instance_method">
329
-
330
- #<strong>emulate_viewport</strong>(viewport) &#x21d2; <tt>true|false</tt>
331
-
332
-
333
-
334
-
335
-
336
- </h3><div class="docstring">
337
- <div class="discussion">
338
-
339
-
340
- </div>
341
- </div>
342
- <div class="tags">
343
- <p class="tag_title">Parameters:</p>
344
- <ul class="param">
345
-
346
- <li>
347
-
348
- <span class='name'>viewport</span>
349
-
350
-
351
- <span class='type'>(<tt><span class='object_link'><a href="Viewport.html" title="Puppeteer::Viewport (class)">Puppeteer::Viewport</a></span></tt>)</span>
352
-
353
-
354
-
355
- </li>
356
-
357
- </ul>
358
-
359
- <p class="tag_title">Returns:</p>
360
- <ul class="return">
361
-
362
- <li>
363
-
364
-
365
- <span class='type'>(<tt>true|false</tt>)</span>
366
-
367
-
368
-
369
- </li>
370
-
371
- </ul>
372
-
373
- </div><table class="source_code">
374
- <tr>
375
- <td>
376
- <pre class="lines">
377
-
378
-
379
- 13
380
- 14
381
- 15
382
- 16
383
- 17
384
- 18
385
- 19
386
- 20
387
- 21
388
- 22
389
- 23
390
- 24
391
- 25
392
- 26
393
- 27
394
- 28
395
- 29
396
- 30
397
- 31
398
- 32
399
- 33
400
- 34
401
- 35
402
- 36
403
- 37
404
- 38
405
- 39</pre>
406
- </td>
407
- <td>
408
- <pre class="code"><span class="info file"># File 'lib/puppeteer/emulation_manager.rb', line 13</span>
409
-
410
- <span class='kw'>def</span> <span class='id identifier rubyid_emulate_viewport'>emulate_viewport</span><span class='lparen'>(</span><span class='id identifier rubyid_viewport'>viewport</span><span class='rparen'>)</span>
411
- <span class='id identifier rubyid_mobile'>mobile</span> <span class='op'>=</span> <span class='id identifier rubyid_viewport'>viewport</span><span class='period'>.</span><span class='id identifier rubyid_mobile?'>mobile?</span>
412
- <span class='id identifier rubyid_width'>width</span> <span class='op'>=</span> <span class='id identifier rubyid_viewport'>viewport</span><span class='period'>.</span><span class='id identifier rubyid_width'>width</span>
413
- <span class='id identifier rubyid_height'>height</span> <span class='op'>=</span> <span class='id identifier rubyid_viewport'>viewport</span><span class='period'>.</span><span class='id identifier rubyid_height'>height</span>
414
- <span class='id identifier rubyid_device_scale_factor'>device_scale_factor</span> <span class='op'>=</span> <span class='id identifier rubyid_viewport'>viewport</span><span class='period'>.</span><span class='id identifier rubyid_device_scale_factor'>device_scale_factor</span>
415
- <span class='comment'># /** @type {Protocol.Emulation.ScreenOrientation} */
416
- </span> <span class='comment'># const screenOrientation = viewport.isLandscape ? { angle: 90, type: &#39;landscapePrimary&#39; } : { angle: 0, type: &#39;portraitPrimary&#39; };
417
- </span> <span class='id identifier rubyid_has_touch'>has_touch</span> <span class='op'>=</span> <span class='id identifier rubyid_viewport'>viewport</span><span class='period'>.</span><span class='id identifier rubyid_has_touch?'>has_touch?</span>
418
-
419
- <span class='id identifier rubyid_await_all'><span class='object_link'><a href="ConcurrentRubyUtils.html#await_all-instance_method" title="Puppeteer::ConcurrentRubyUtils#await_all (method)">await_all</a></span></span><span class='lparen'>(</span>
420
- <span class='ivar'>@client</span><span class='period'>.</span><span class='id identifier rubyid_async_send_message'>async_send_message</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>Emulation.setDeviceMetricsOverride</span><span class='tstring_end'>&#39;</span></span><span class='comma'>,</span>
421
- <span class='label'>mobile:</span> <span class='id identifier rubyid_mobile'>mobile</span><span class='comma'>,</span>
422
- <span class='label'>width:</span> <span class='id identifier rubyid_width'>width</span><span class='comma'>,</span>
423
- <span class='label'>height:</span> <span class='id identifier rubyid_height'>height</span><span class='comma'>,</span>
424
- <span class='label'>deviceScaleFactor:</span> <span class='id identifier rubyid_device_scale_factor'>device_scale_factor</span><span class='comma'>,</span>
425
- <span class='comment'># screenOrientation: screen_orientation,
426
- </span> <span class='rparen'>)</span><span class='comma'>,</span>
427
- <span class='ivar'>@client</span><span class='period'>.</span><span class='id identifier rubyid_async_send_message'>async_send_message</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>Emulation.setTouchEmulationEnabled</span><span class='tstring_end'>&#39;</span></span><span class='comma'>,</span>
428
- <span class='label'>enabled:</span> <span class='id identifier rubyid_has_touch'>has_touch</span><span class='comma'>,</span>
429
- <span class='rparen'>)</span><span class='comma'>,</span>
430
- <span class='rparen'>)</span>
431
-
432
- <span class='id identifier rubyid_reload_needed'>reload_needed</span> <span class='op'>=</span> <span class='ivar'>@emulating_mobile</span> <span class='op'>!=</span> <span class='id identifier rubyid_mobile'>mobile</span> <span class='op'>||</span> <span class='ivar'>@hasTouch</span> <span class='op'>!=</span> <span class='id identifier rubyid_has_touch'>has_touch</span>
433
- <span class='ivar'>@emulating_mobile</span> <span class='op'>=</span> <span class='id identifier rubyid_mobile'>mobile</span>
434
- <span class='ivar'>@has_touch</span> <span class='op'>=</span> <span class='id identifier rubyid_has_touch'>has_touch</span>
435
- <span class='id identifier rubyid_reload_needed'>reload_needed</span>
436
- <span class='kw'>end</span></pre>
437
- </td>
438
- </tr>
439
- </table>
440
- </div>
441
-
442
- </div>
443
-
444
- </div>
445
-
446
- <div id="footer">
447
- Generated on Sat Jun 20 17:15:08 2020 by
448
- <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
449
- 0.9.24 (ruby-2.6.3).
450
- </div>
451
-
452
- </div>
453
- </body>
454
- </html>