Source

scope.bitbucket.org / scope / services / DocumentManager / DocumentManager_1_1.html

Full commit
  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    
    <title>DocumentManager 1.1 &mdash; Scope Interface v1 documentation</title>
    <link rel="stylesheet" href="../../_static/default.css" type="text/css" />
    <link rel="stylesheet" href="../../_static/pygments.css" type="text/css" />
    <link rel="stylesheet" media="print" href="../../_static/print.css" type="text/css" />
    <script type="text/javascript">
      var DOCUMENTATION_OPTIONS = {
        URL_ROOT:    '../../',
        VERSION:     '1',
        COLLAPSE_MODINDEX: false,
        FILE_SUFFIX: '.html',
        HAS_SOURCE:  true
      };
    </script>
    <script type="text/javascript" src="../../_static/jquery.js"></script>
    <script type="text/javascript" src="../../_static/underscore.js"></script>
    <script type="text/javascript" src="../../_static/doctools.js"></script>
    <link rel="copyright" title="Copyright" href="../../copyright.html" />
    <link rel="top" title="Scope Interface v1 documentation" href="../../index.html" />
    <link rel="up" title="DocumentManager" href="../DocumentManager.html" />
    <link rel="next" title="Ecmascript" href="../Ecmascript.html" />
    <link rel="prev" title="DocumentManager 1.0" href="DocumentManager_1_0.html" /> 
  </head>
  <body>
    <div class="related">
      <h3>Navigation</h3>
      <ul>
        <li class="right" style="margin-right: 10px">
          <a href="../../genindex.html" title="General Index"
             accesskey="I">index</a></li>
        <li class="right" >
          <a href="../Ecmascript.html" title="Ecmascript"
             accesskey="N">next</a> |</li>
        <li class="right" >
          <a href="DocumentManager_1_0.html" title="DocumentManager 1.0"
             accesskey="P">previous</a> |</li>
        <li><a href="../../index.html">Scope Interface v1 documentation</a> &raquo;</li>
          <li><a href="../DocumentManager.html" accesskey="U">DocumentManager</a> &raquo;</li> 
      </ul>
    </div>  

    <div class="document">
      <div class="documentwrapper">
        <div class="bodywrapper">
          <div class="body">
            
  <div class="section" id="documentmanager-1-1">
<h1>DocumentManager 1.1<a class="headerlink" href="#documentmanager-1-1" title="Permalink to this headline"></a></h1>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field"><th class="field-name">Generated:</th><td class="field-body">hob rst-doc</td>
</tr>
<tr class="field"><th class="field-name">Version:</th><td class="field-body">1.1</td>
</tr>
<tr class="field"><th class="field-name">Status:</th><td class="field-body">Published</td>
</tr>
</tbody>
</table>
<div class="section" id="service">
<h2>Service<a class="headerlink" href="#service" title="Permalink to this headline"></a></h2>
<p><strong>DocumentManager</strong> provides a way to monitor, and interact with
individual documents/frames in a document tree (whether they have
an ECMASCript environment or not).</p>
<p>Example functionality includes loading URLs in a certain frame, and
enumerating all the documents in a certain Window.</p>
<div class="section" id="id-fields">
<h3>ID fields<a class="headerlink" href="#id-fields" title="Permalink to this headline"></a></h3>
<ul class="simple">
<li>Frame IDs represent the entity that contains the document. When a new
URL is loaded in a frame, the document ID will change, but the frame ID
will not. This makes it possible to monitor the document history for
individual frames. (Please note that the document ID will not change when
a frame is <a href="#id1"><span class="problematic" id="id2">*</span></a>re*loaded).</li>
<li>Document ID represent the actual document. This is recreated when a new
URL is loaded in its parent frame.</li>
</ul>
</div>
<div class="section" id="external-id-fields">
<h3>External ID fields<a class="headerlink" href="#external-id-fields" title="Permalink to this headline"></a></h3>
<p>Some IDs used in this service originate (and can be used with) other
services.</p>
<ul class="simple">
<li>Window IDs are the same in all services, and can be used interchangeably
everywhere. See <em>WindowManager</em> for window-centric commands and events.</li>
<li>Resource IDs in this service are compatible with resource ID fields found
in <em>ResourceManager</em>.</li>
</ul>
<div class="highlight-c"><div class="highlight"><pre><span class="n">service</span> <span class="n">DocumentManager</span>
<span class="p">{</span>
  <span class="n">option</span> <span class="p">(</span><span class="n">version</span><span class="p">)</span> <span class="o">=</span> <span class="s">&quot;1.1&quot;</span><span class="p">;</span>


  <span class="n">command</span> <span class="n">ListDocuments</span><span class="p">(</span><span class="n">ListDocumentsArg</span><span class="p">)</span>   <span class="n">returns</span> <span class="p">(</span><span class="n">DocumentList</span><span class="p">)</span>        <span class="o">=</span> <span class="mi">1</span><span class="p">;</span>
  <span class="n">command</span> <span class="n">LoadDocument</span><span class="p">(</span><span class="n">LoadDocumentArg</span><span class="p">)</span>     <span class="n">returns</span> <span class="p">(</span><span class="n">Default</span><span class="p">)</span>             <span class="o">=</span> <span class="mi">2</span><span class="p">;</span>
  <span class="n">command</span> <span class="n">ReloadDocument</span><span class="p">(</span><span class="n">ReloadDocumentArg</span><span class="p">)</span> <span class="n">returns</span> <span class="p">(</span><span class="n">Default</span><span class="p">)</span>             <span class="o">=</span> <span class="mi">3</span><span class="p">;</span>
  <span class="n">command</span> <span class="n">SearchText</span><span class="p">(</span><span class="n">SearchTextArg</span><span class="p">)</span>         <span class="n">returns</span> <span class="p">(</span><span class="n">HighlightList</span><span class="p">)</span>       <span class="o">=</span> <span class="mi">6</span><span class="p">;</span>
  <span class="n">command</span> <span class="n">GetHighlights</span><span class="p">(</span><span class="n">GetHighlightsArg</span><span class="p">)</span>   <span class="n">returns</span> <span class="p">(</span><span class="n">HighlightList</span><span class="p">)</span>       <span class="o">=</span> <span class="mi">7</span><span class="p">;</span>
  <span class="n">command</span> <span class="n">GetPageText</span><span class="p">(</span><span class="n">GetPageTextArg</span><span class="p">)</span>       <span class="n">returns</span> <span class="p">(</span><span class="n">PageText</span><span class="p">)</span>            <span class="o">=</span> <span class="mi">8</span><span class="p">;</span>
  <span class="n">event</span>   <span class="n">OnAboutToLoadDocument</span>             <span class="n">returns</span> <span class="p">(</span><span class="n">AboutToLoadDocument</span><span class="p">)</span> <span class="o">=</span> <span class="mi">4</span><span class="p">;</span>
  <span class="n">event</span>   <span class="n">OnDocumentLoaded</span>                  <span class="n">returns</span> <span class="p">(</span><span class="n">DocumentLoaded</span><span class="p">)</span>      <span class="o">=</span> <span class="mi">5</span><span class="p">;</span>
<span class="p">}</span>
</pre></div>
</div>
</div>
</div>
<div class="section" id="commands">
<h2>Commands<a class="headerlink" href="#commands" title="Permalink to this headline"></a></h2>
<div class="section" id="gethighlights">
<span id="index-0"></span><h3><tt class="docutils literal"><span class="pre">GetHighlights</span></tt><a class="headerlink" href="#gethighlights" title="Permalink to this headline"></a></h3>
<div class="highlight-python"><pre>command GetHighlights(GetHighlightsArg) returns (HighlightList) = 7;</pre>
</div>
<p>Get information about the currently highlighted text, resulting from a
previous inline text search.</p>
<p>This command will fail if used on a build which does not support
&#8216;find-all&#8217; functionality, typically (non-smart) phone and TV builds.</p>
<p>&#64;since 1.1</p>
<p>argument:</p>
<div class="highlight-c" id="index-1"><div class="highlight"><pre><span class="n">message</span> <span class="n">GetHighlightsArg</span>
<span class="p">{</span>
  <span class="cm">/**</span>
<span class="cm">   * Get highlights in this window.</span>
<span class="cm">   */</span>
  <span class="n">required</span> <span class="n">uint32</span> <span class="n">windowID</span> <span class="o">=</span> <span class="mi">1</span><span class="p">;</span>
  <span class="cm">/**</span>
<span class="cm">   * If set, search only in the specified frame. The frame must be</span>
<span class="cm">   * part of the document tree of the previously specified window.</span>
<span class="cm">   */</span>
  <span class="n">optional</span> <span class="n">uint32</span> <span class="n">frameID</span>  <span class="o">=</span> <span class="mi">2</span><span class="p">;</span>
<span class="p">}</span>
</pre></div>
</div>
<p>returns:</p>
<div class="highlight-c" id="index-2"><div class="highlight"><pre><span class="n">message</span> <span class="n">HighlightList</span>
<span class="p">{</span>
  <span class="cm">/**</span>
<span class="cm">   * When searching for text in a page, we often get multiple hits. This is a</span>
<span class="cm">   * list of all the current hits.</span>
<span class="cm">   */</span>
  <span class="n">repeated</span> <span class="n">Highlight</span> <span class="n">highlightList</span> <span class="o">=</span> <span class="mi">1</span><span class="p">;</span>
<span class="p">}</span>
</pre></div>
</div>
<p>references:</p>
<div class="highlight-c" id="index-3"><div class="highlight"><pre><span class="n">message</span> <span class="n">Node</span>
<span class="p">{</span>
  <span class="cm">/**</span>
<span class="cm">   * E.g. &quot;a&quot;, &quot;div&quot;.</span>
<span class="cm">   */</span>
  <span class="n">required</span> <span class="n">string</span> <span class="n">tag</span> <span class="o">=</span> <span class="mi">1</span><span class="p">;</span>
  <span class="cm">/**</span>
<span class="cm">   * Present if there is an ID attribute set.</span>
<span class="cm">   */</span>
  <span class="n">optional</span> <span class="n">string</span> <span class="n">id</span>  <span class="o">=</span> <span class="mi">2</span><span class="p">;</span>
<span class="p">}</span>
</pre></div>
</div>
<div class="highlight-c" id="index-4"><div class="highlight"><pre><span class="n">message</span> <span class="n">Highlight</span>
<span class="p">{</span>
  <span class="cm">/**</span>
<span class="cm">   * Which frame this highlight is in.</span>
<span class="cm">   */</span>
  <span class="n">required</span> <span class="n">uint32</span> <span class="n">frameID</span> <span class="o">=</span> <span class="mi">1</span><span class="p">;</span>
  <span class="cm">/**</span>
<span class="cm">   * The first common ancestor that contains the entire highlight.</span>
<span class="cm">   */</span>
  <span class="n">optional</span> <span class="n">Node</span>   <span class="n">node</span>    <span class="o">=</span> <span class="mi">2</span><span class="p">;</span>
<span class="p">}</span>
</pre></div>
</div>
</div>
<div class="section" id="getpagetext">
<span id="index-5"></span><h3><tt class="docutils literal"><span class="pre">GetPageText</span></tt><a class="headerlink" href="#getpagetext" title="Permalink to this headline"></a></h3>
<div class="highlight-python"><pre>command GetPageText(GetPageTextArg) returns (PageText) = 8;</pre>
</div>
<p>Get the displayed (plain) text of a window, or document subtree. This
command can fail if the connected build does not support the necessary
text serialization feature.</p>
<p>&#64;since 1.1</p>
<p>argument:</p>
<div class="highlight-c" id="index-6"><div class="highlight"><pre><span class="n">message</span> <span class="n">GetPageTextArg</span>
<span class="p">{</span>
  <span class="cm">/**</span>
<span class="cm">   * Get the text in this window.</span>
<span class="cm">   */</span>
  <span class="n">required</span> <span class="n">uint32</span> <span class="n">windowID</span> <span class="o">=</span> <span class="mi">1</span><span class="p">;</span>
  <span class="cm">/**</span>
<span class="cm">   * If set, get the text only for the specified frame. The frame must be</span>
<span class="cm">   * part of the document tree of the previously specified window.</span>
<span class="cm">   */</span>
  <span class="n">optional</span> <span class="n">uint32</span> <span class="n">frameID</span>  <span class="o">=</span> <span class="mi">2</span><span class="p">;</span>
<span class="p">}</span>
</pre></div>
</div>
<p>returns:</p>
<div class="highlight-c" id="index-7"><div class="highlight"><pre><span class="n">message</span> <span class="n">PageText</span>
<span class="p">{</span>
  <span class="n">message</span> <span class="n">DocumentText</span>
  <span class="p">{</span>
    <span class="cm">/**</span>
<span class="cm">     * Which frame this document sits in.</span>
<span class="cm">     */</span>
    <span class="n">required</span> <span class="n">uint32</span> <span class="n">frameID</span>    <span class="o">=</span> <span class="mi">1</span><span class="p">;</span>
    <span class="cm">/**</span>
<span class="cm">     * The document that contains this text.</span>
<span class="cm">     */</span>
    <span class="n">required</span> <span class="n">uint32</span> <span class="n">documentID</span> <span class="o">=</span> <span class="mi">2</span><span class="p">;</span>
    <span class="cm">/**</span>
<span class="cm">     * The (plain) text of the document.</span>
<span class="cm">     */</span>
    <span class="n">required</span> <span class="n">string</span> <span class="n">text</span>       <span class="o">=</span> <span class="mi">3</span><span class="p">;</span>
  <span class="p">}</span>

  <span class="n">repeated</span> <span class="n">DocumentText</span> <span class="n">documentTextList</span> <span class="o">=</span> <span class="mi">1</span><span class="p">;</span>
<span class="p">}</span>
</pre></div>
</div>
</div>
<div class="section" id="listdocuments">
<span id="index-8"></span><h3><tt class="docutils literal"><span class="pre">ListDocuments</span></tt><a class="headerlink" href="#listdocuments" title="Permalink to this headline"></a></h3>
<div class="highlight-python"><pre>command ListDocuments(ListDocumentsArg) returns (DocumentList) = 1;</pre>
</div>
<p>Get the document tree for a Window, or for all Windows.</p>
<p>argument:</p>
<div class="highlight-c" id="index-9"><div class="highlight"><pre><span class="n">message</span> <span class="n">ListDocumentsArg</span>
<span class="p">{</span>
  <span class="n">optional</span> <span class="n">uint32</span> <span class="n">windowID</span> <span class="o">=</span> <span class="mi">1</span><span class="p">;</span>
<span class="p">}</span>
</pre></div>
</div>
<p>returns:</p>
<div class="highlight-c" id="index-10"><div class="highlight"><pre><span class="n">message</span> <span class="n">DocumentList</span>
<span class="p">{</span>
  <span class="n">repeated</span> <span class="n">Document</span> <span class="n">documentList</span> <span class="o">=</span> <span class="mi">1</span><span class="p">;</span>
<span class="p">}</span>
</pre></div>
</div>
<p>references:</p>
<div class="highlight-c" id="index-11"><div class="highlight"><pre><span class="n">message</span> <span class="n">Document</span>
<span class="p">{</span>
  <span class="n">required</span> <span class="n">uint32</span> <span class="n">windowID</span>         <span class="o">=</span> <span class="mi">1</span><span class="p">;</span>
  <span class="n">required</span> <span class="n">uint32</span> <span class="n">frameID</span>          <span class="o">=</span> <span class="mi">2</span><span class="p">;</span>
  <span class="n">optional</span> <span class="n">uint32</span> <span class="n">documentID</span>       <span class="o">=</span> <span class="mi">3</span><span class="p">;</span>
  <span class="cm">/**</span>
<span class="cm">   * The parent frame, present only if the frame is not the</span>
<span class="cm">   * top level frame.</span>
<span class="cm">   */</span>
  <span class="n">optional</span> <span class="n">uint32</span> <span class="n">parentFrameID</span>    <span class="o">=</span> <span class="mi">4</span><span class="p">;</span>
  <span class="cm">/**</span>
<span class="cm">   * Present unless this document is the top-level document</span>
<span class="cm">   * in the Window.</span>
<span class="cm">   */</span>
  <span class="n">optional</span> <span class="n">uint32</span> <span class="n">parentDocumentID</span> <span class="o">=</span> <span class="mi">5</span><span class="p">;</span>
  <span class="cm">/**</span>
<span class="cm">   * The current URL of the document.</span>
<span class="cm">   */</span>
  <span class="n">optional</span> <span class="n">string</span> <span class="n">url</span>              <span class="o">=</span> <span class="mi">6</span><span class="p">;</span>
  <span class="cm">/**</span>
<span class="cm">   * The resource used to generate this document.</span>
<span class="cm">   */</span>
  <span class="n">optional</span> <span class="n">uint32</span> <span class="n">resourceID</span>       <span class="o">=</span> <span class="mi">7</span><span class="p">;</span>
  <span class="cm">/**</span>
<span class="cm">   * The value of the name attribute of the HTMLFrameElement. If the</span>
<span class="cm">   * frame does not have a name, or this document is not associated with</span>
<span class="cm">   * a HTMLFrameElement, this will field will not be present.</span>
<span class="cm">   */</span>
  <span class="n">optional</span> <span class="n">string</span> <span class="n">frameElementName</span> <span class="o">=</span> <span class="mi">8</span><span class="p">;</span>
  <span class="cm">/**</span>
<span class="cm">   * The value of the id attribute of the HTMLFrameElement. If the</span>
<span class="cm">   * frame does not have an id, or this document is not associated with</span>
<span class="cm">   * a HTMLFrameElement, this will field will not be present.</span>
<span class="cm">   */</span>
  <span class="n">optional</span> <span class="n">string</span> <span class="n">frameElementID</span>   <span class="o">=</span> <span class="mi">9</span><span class="p">;</span>
<span class="p">}</span>
</pre></div>
</div>
</div>
<div class="section" id="loaddocument">
<span id="index-12"></span><h3><tt class="docutils literal"><span class="pre">LoadDocument</span></tt><a class="headerlink" href="#loaddocument" title="Permalink to this headline"></a></h3>
<div class="highlight-python"><pre>command LoadDocument(LoadDocumentArg) returns (Default) = 2;</pre>
</div>
<p>Load a URL in a specified frame.</p>
<p>argument:</p>
<div class="highlight-c" id="index-13"><div class="highlight"><pre><span class="n">message</span> <span class="n">LoadDocumentArg</span>
<span class="p">{</span>
  <span class="cm">/**</span>
<span class="cm">   * The window containing the frame.</span>
<span class="cm">   */</span>
  <span class="n">required</span> <span class="n">uint32</span> <span class="n">windowID</span> <span class="o">=</span> <span class="mi">1</span><span class="p">;</span>
  <span class="n">required</span> <span class="n">uint32</span> <span class="n">frameID</span>  <span class="o">=</span> <span class="mi">2</span><span class="p">;</span>
  <span class="n">required</span> <span class="n">string</span> <span class="n">url</span>      <span class="o">=</span> <span class="mi">3</span><span class="p">;</span>
<span class="p">}</span>
</pre></div>
</div>
</div>
<div class="section" id="reloaddocument">
<span id="index-14"></span><h3><tt class="docutils literal"><span class="pre">ReloadDocument</span></tt><a class="headerlink" href="#reloaddocument" title="Permalink to this headline"></a></h3>
<div class="highlight-python"><pre>command ReloadDocument(ReloadDocumentArg) returns (Default) = 3;</pre>
</div>
<p>Reload the current URL for a specified frame.</p>
<p>argument:</p>
<div class="highlight-c" id="index-15"><div class="highlight"><pre><span class="n">message</span> <span class="n">ReloadDocumentArg</span>
<span class="p">{</span>
  <span class="cm">/**</span>
<span class="cm">   * The window containing the frame.</span>
<span class="cm">   */</span>
  <span class="n">required</span> <span class="n">uint32</span> <span class="n">windowID</span> <span class="o">=</span> <span class="mi">1</span><span class="p">;</span>
  <span class="n">required</span> <span class="n">uint32</span> <span class="n">frameID</span>  <span class="o">=</span> <span class="mi">2</span><span class="p">;</span>
<span class="p">}</span>
</pre></div>
</div>
</div>
<div class="section" id="searchtext">
<span id="index-16"></span><h3><tt class="docutils literal"><span class="pre">SearchText</span></tt><a class="headerlink" href="#searchtext" title="Permalink to this headline"></a></h3>
<div class="highlight-python"><pre>command SearchText(SearchTextArg) returns (HighlightList) = 6;</pre>
</div>
<p>Search for a text string in a certain window, or frame.</p>
<p>This command will fail if used on a build which does not support
&#8216;find-all&#8217; functionality, typically (non-smart) phone and TV builds.</p>
<p>&#64;since 1.1</p>
<p>argument:</p>
<div class="highlight-c" id="index-17"><div class="highlight"><pre><span class="n">message</span> <span class="n">SearchTextArg</span>
<span class="p">{</span>
  <span class="cm">/**</span>
<span class="cm">   * Search in this window.</span>
<span class="cm">   */</span>
  <span class="n">required</span> <span class="n">uint32</span> <span class="n">windowID</span> <span class="o">=</span> <span class="mi">1</span><span class="p">;</span>
  <span class="cm">/**</span>
<span class="cm">   * The text string to search for.</span>
<span class="cm">   */</span>
  <span class="n">required</span> <span class="n">string</span> <span class="n">text</span>     <span class="o">=</span> <span class="mi">2</span><span class="p">;</span>
  <span class="cm">/**</span>
<span class="cm">   * If set, search only in the specified frame. The frame must be</span>
<span class="cm">   * part of the document tree of the previously specified window.</span>
<span class="cm">   */</span>
  <span class="n">optional</span> <span class="n">uint32</span> <span class="n">frameID</span>  <span class="o">=</span> <span class="mi">3</span><span class="p">;</span>
<span class="p">}</span>
</pre></div>
</div>
<p>returns:</p>
<div class="highlight-c" id="index-18"><div class="highlight"><pre><span class="n">message</span> <span class="n">HighlightList</span>
<span class="p">{</span>
  <span class="cm">/**</span>
<span class="cm">   * When searching for text in a page, we often get multiple hits. This is a</span>
<span class="cm">   * list of all the current hits.</span>
<span class="cm">   */</span>
  <span class="n">repeated</span> <span class="n">Highlight</span> <span class="n">highlightList</span> <span class="o">=</span> <span class="mi">1</span><span class="p">;</span>
<span class="p">}</span>
</pre></div>
</div>
<p>references:</p>
<div class="highlight-c" id="index-19"><div class="highlight"><pre><span class="n">message</span> <span class="n">Node</span>
<span class="p">{</span>
  <span class="cm">/**</span>
<span class="cm">   * E.g. &quot;a&quot;, &quot;div&quot;.</span>
<span class="cm">   */</span>
  <span class="n">required</span> <span class="n">string</span> <span class="n">tag</span> <span class="o">=</span> <span class="mi">1</span><span class="p">;</span>
  <span class="cm">/**</span>
<span class="cm">   * Present if there is an ID attribute set.</span>
<span class="cm">   */</span>
  <span class="n">optional</span> <span class="n">string</span> <span class="n">id</span>  <span class="o">=</span> <span class="mi">2</span><span class="p">;</span>
<span class="p">}</span>
</pre></div>
</div>
<div class="highlight-c" id="index-20"><div class="highlight"><pre><span class="n">message</span> <span class="n">Highlight</span>
<span class="p">{</span>
  <span class="cm">/**</span>
<span class="cm">   * Which frame this highlight is in.</span>
<span class="cm">   */</span>
  <span class="n">required</span> <span class="n">uint32</span> <span class="n">frameID</span> <span class="o">=</span> <span class="mi">1</span><span class="p">;</span>
  <span class="cm">/**</span>
<span class="cm">   * The first common ancestor that contains the entire highlight.</span>
<span class="cm">   */</span>
  <span class="n">optional</span> <span class="n">Node</span>   <span class="n">node</span>    <span class="o">=</span> <span class="mi">2</span><span class="p">;</span>
<span class="p">}</span>
</pre></div>
</div>
</div>
</div>
<div class="section" id="events">
<h2>Events<a class="headerlink" href="#events" title="Permalink to this headline"></a></h2>
<div class="section" id="onabouttoloaddocument">
<span id="index-21"></span><h3><tt class="docutils literal"><span class="pre">OnAboutToLoadDocument</span></tt><a class="headerlink" href="#onabouttoloaddocument" title="Permalink to this headline"></a></h3>
<div class="highlight-python"><pre>event OnAboutToLoadDocument returns (AboutToLoadDocument) = 4;</pre>
</div>
<p>Fired when a document is about to be loaded (regardless
of whether the load actually succeeds).</p>
<p>message:</p>
<div class="highlight-c" id="index-22"><div class="highlight"><pre><span class="n">message</span> <span class="n">AboutToLoadDocument</span>
<span class="p">{</span>
  <span class="n">required</span> <span class="n">uint32</span> <span class="n">windowID</span>         <span class="o">=</span> <span class="mi">1</span><span class="p">;</span>
  <span class="n">required</span> <span class="n">uint32</span> <span class="n">frameID</span>          <span class="o">=</span> <span class="mi">2</span><span class="p">;</span>
  <span class="cm">/**</span>
<span class="cm">   * The resource that is about to get loaded.</span>
<span class="cm">   */</span>
  <span class="n">required</span> <span class="n">uint32</span> <span class="n">resourceID</span>       <span class="o">=</span> <span class="mi">3</span><span class="p">;</span>
  <span class="cm">/**</span>
<span class="cm">   * Milliseconds since Unix Epoch.</span>
<span class="cm">   */</span>
  <span class="n">required</span> <span class="kt">double</span> <span class="n">time</span>             <span class="o">=</span> <span class="mi">4</span><span class="p">;</span>
  <span class="cm">/**</span>
<span class="cm">   * The parent document, present only if the frame is not the</span>
<span class="cm">   * top level frame.</span>
<span class="cm">   */</span>
  <span class="n">optional</span> <span class="n">uint32</span> <span class="n">parentDocumentID</span> <span class="o">=</span> <span class="mi">5</span><span class="p">;</span>
  <span class="cm">/**</span>
<span class="cm">   * The parent frame, present only if the frame is not the</span>
<span class="cm">   * top level frame.</span>
<span class="cm">   */</span>
  <span class="n">optional</span> <span class="n">uint32</span> <span class="n">parentFrameID</span>    <span class="o">=</span> <span class="mi">6</span><span class="p">;</span>
<span class="p">}</span>
</pre></div>
</div>
</div>
<div class="section" id="ondocumentloaded">
<span id="index-23"></span><h3><tt class="docutils literal"><span class="pre">OnDocumentLoaded</span></tt><a class="headerlink" href="#ondocumentloaded" title="Permalink to this headline"></a></h3>
<div class="highlight-python"><pre>event OnDocumentLoaded returns (DocumentLoaded) = 5;</pre>
</div>
<p>Fired when a document is fully loaded (after DOM event
&#8216;load&#8217; has finished).</p>
<p>message:</p>
<div class="highlight-c" id="index-24"><div class="highlight"><pre><span class="n">message</span> <span class="n">DocumentLoaded</span>
<span class="p">{</span>
  <span class="n">required</span> <span class="n">uint32</span> <span class="n">windowID</span>   <span class="o">=</span> <span class="mi">1</span><span class="p">;</span>
  <span class="n">required</span> <span class="n">uint32</span> <span class="n">frameID</span>    <span class="o">=</span> <span class="mi">2</span><span class="p">;</span>
  <span class="n">required</span> <span class="n">uint32</span> <span class="n">documentID</span> <span class="o">=</span> <span class="mi">3</span><span class="p">;</span>
<span class="p">}</span>
</pre></div>
</div>
</div>
</div>
</div>


          </div>
        </div>
      </div>
      <div class="sphinxsidebar">
        <div class="sphinxsidebarwrapper">
            <p class="logo"><a href="../../index.html">
              <img class="logo" src="../../_static/Opera-logo-PNG.png" alt="Logo"/>
            </a></p>
            <h3><a href="../../index.html">Table Of Contents</a></h3>
            <ul>
<li><a class="reference internal" href="#">DocumentManager 1.1</a><ul>
<li><a class="reference internal" href="#service">Service</a><ul>
<li><a class="reference internal" href="#id-fields">ID fields</a></li>
<li><a class="reference internal" href="#external-id-fields">External ID fields</a></li>
</ul>
</li>
<li><a class="reference internal" href="#commands">Commands</a><ul>
<li><a class="reference internal" href="#gethighlights"><tt class="docutils literal"><span class="pre">GetHighlights</span></tt></a></li>
<li><a class="reference internal" href="#getpagetext"><tt class="docutils literal"><span class="pre">GetPageText</span></tt></a></li>
<li><a class="reference internal" href="#listdocuments"><tt class="docutils literal"><span class="pre">ListDocuments</span></tt></a></li>
<li><a class="reference internal" href="#loaddocument"><tt class="docutils literal"><span class="pre">LoadDocument</span></tt></a></li>
<li><a class="reference internal" href="#reloaddocument"><tt class="docutils literal"><span class="pre">ReloadDocument</span></tt></a></li>
<li><a class="reference internal" href="#searchtext"><tt class="docutils literal"><span class="pre">SearchText</span></tt></a></li>
</ul>
</li>
<li><a class="reference internal" href="#events">Events</a><ul>
<li><a class="reference internal" href="#onabouttoloaddocument"><tt class="docutils literal"><span class="pre">OnAboutToLoadDocument</span></tt></a></li>
<li><a class="reference internal" href="#ondocumentloaded"><tt class="docutils literal"><span class="pre">OnDocumentLoaded</span></tt></a></li>
</ul>
</li>
</ul>
</li>
</ul>

            <h4>Previous topic</h4>
            <p class="topless"><a href="DocumentManager_1_0.html"
                                  title="previous chapter">DocumentManager 1.0</a></p>
            <h4>Next topic</h4>
            <p class="topless"><a href="../Ecmascript.html"
                                  title="next chapter">Ecmascript</a></p>
            <h3>This Page</h3>
            <ul class="this-page-menu">
              <li><a href="../../_sources/services/DocumentManager/DocumentManager_1_1.txt"
                     rel="nofollow">Show Source</a></li>
             <li><a href="./pdf/ScopeInterface.pdf" rel="nofollow">Download as PDF</a></li>
            </ul>
          <div id="searchbox" style="display: none">
            <h3>Quick search</h3>
              <form class="search" action="../../search.html" method="get">
                <input type="text" name="q" size="18" />
                <input type="submit" value="Go" />
                <input type="hidden" name="check_keywords" value="yes" />
                <input type="hidden" name="area" value="default" />
              </form>
              <p class="searchtip" style="font-size: 90%">
              Enter search terms or a module, class or function name.
              </p>
          </div>
          
          <script type="text/javascript">$('#searchbox').show(0);</script>
          <h3><a href="glossary.html">Glossary</a></h3>
        </div>
      </div>
      <div class="clearer"></div>
    </div>
    <div class="footer">
    © Copyright 2006-2010, Opera Software ASA. 
    <a href="./index.html#license">Licensed under Apache License, Version 2.0.</a>
      Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.0.6.
    </div>
  </body>
</html>