File: method.WebView.load_html.html

package info (click to toggle)
wpewebkit 2.50.5-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 438,332 kB
  • sloc: cpp: 3,777,828; javascript: 197,888; ansic: 156,951; python: 49,119; asm: 21,987; ruby: 18,540; perl: 16,722; xml: 4,623; yacc: 2,360; sh: 2,096; java: 2,019; lex: 1,327; pascal: 366; makefile: 90
file content (387 lines) | stat: -rw-r--r-- 14,489 bytes parent folder | download
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
<!--
SPDX-FileCopyrightText: The WebKit GTK and WPE teams

SPDX-License-Identifier: BSD, LGPL-2.1
-->

<!DOCTYPE html>
<html lang="en">
<head>
  <title>WPEWebKit.WebView.load_html</title>
  <meta name="viewport" content="width=device-width, initial-scale=1">

  <meta charset="utf-8" />

  
  <meta property="og:type" content="website"/>

  

  
  <meta priority="og:title" content="WPEWebKit.WebView.load_html"/>
  <meta priority="og:description" content="Reference for WPEWebKit.WebView.load_html"/>
  <meta name="twitter:title" content="WPEWebKit.WebView.load_html"/>
  <meta name="twitter:description" content="Reference for WPEWebKit.WebView.load_html"/>


  
  <meta name="twitter:card" content="summary"/>

  
  
  
  

  <link rel="stylesheet" href="style.css" type="text/css" />

  

  
  <script src="wpe2-urlmap.js"></script>
  
  
  <script src="fzy.js"></script>
  <script src="search.js"></script>
  
  <script src="main.js"></script>
</head>

<body>
  <div id="body-wrapper" tabindex="-1">

    <nav class="sidebar devhelp-hidden">
      
      
      <div class="search section">
        <form id="search-form" autocomplete="off">
          <input id="search-input" type="text" name="do-not-autocomplete" placeholder="Click, or press 's' to search" autocomplete="off"/>
        </form>
      </div>
      
      <div class="section namespace">
        <h3><a href="index.html">WPEWebKit</a></h3>
        <p>API Version: 2.0</p>
        
        <p>Library Version: 2.50.5</p>
        
      </div>
      
<div class="section">
  <h5>Type</h5>
  <div class="links">
    <a href="class.WebView.html">WebView</a>
  </div>
</div>
<div class="section">
  <h5>Methods</h5>
  <div class="links">
  
    <a class="method" href="method.WebView.add_frame_displayed_callback.html">add_frame_displayed_callback</a>
  
    <a class="method" href="method.WebView.call_async_javascript_function.html">call_async_javascript_function</a>
  
    <a class="method" href="method.WebView.call_async_javascript_function_finish.html">call_async_javascript_function_finish</a>
  
    <a class="method" href="method.WebView.can_execute_editing_command.html">can_execute_editing_command</a>
  
    <a class="method" href="method.WebView.can_execute_editing_command_finish.html">can_execute_editing_command_finish</a>
  
    <a class="method" href="method.WebView.can_go_back.html">can_go_back</a>
  
    <a class="method" href="method.WebView.can_go_forward.html">can_go_forward</a>
  
    <a class="method" href="method.WebView.can_show_mime_type.html">can_show_mime_type</a>
  
    <a class="method" href="method.WebView.download_uri.html">download_uri</a>
  
    <a class="method" href="method.WebView.evaluate_javascript.html">evaluate_javascript</a>
  
    <a class="method" href="method.WebView.evaluate_javascript_finish.html">evaluate_javascript_finish</a>
  
    <a class="method" href="method.WebView.execute_editing_command.html">execute_editing_command</a>
  
    <a class="method" href="method.WebView.execute_editing_command_with_argument.html">execute_editing_command_with_argument</a>
  
    <a class="method" href="method.WebView.get_automation_presentation_type.html">get_automation_presentation_type</a>
  
    <a class="method" href="method.WebView.get_back_forward_list.html">get_back_forward_list</a>
  
    <a class="method" href="method.WebView.get_backend.html">get_backend</a>
  
    <a class="method" href="method.WebView.get_background_color.html">get_background_color</a>
  
    <a class="method" href="method.WebView.get_camera_capture_state.html">get_camera_capture_state</a>
  
    <a class="method" href="method.WebView.get_context.html">get_context</a>
  
    <a class="method" href="method.WebView.get_custom_charset.html">get_custom_charset</a>
  
    <a class="method" href="method.WebView.get_default_content_security_policy.html">get_default_content_security_policy</a>
  
    <a class="method" href="method.WebView.get_display.html">get_display</a>
  
    <a class="method" href="method.WebView.get_display_capture_state.html">get_display_capture_state</a>
  
    <a class="method" href="method.WebView.get_editor_state.html">get_editor_state</a>
  
    <a class="method" href="method.WebView.get_estimated_load_progress.html">get_estimated_load_progress</a>
  
    <a class="method" href="method.WebView.get_find_controller.html">get_find_controller</a>
  
    <a class="method" href="method.WebView.get_input_method_context.html">get_input_method_context</a>
  
    <a class="method" href="method.WebView.get_is_muted.html">get_is_muted</a>
  
    <a class="method" href="method.WebView.get_is_web_process_responsive.html">get_is_web_process_responsive</a>
  
    <a class="method" href="method.WebView.get_main_resource.html">get_main_resource</a>
  
    <a class="method" href="method.WebView.get_microphone_capture_state.html">get_microphone_capture_state</a>
  
    <a class="method" href="method.WebView.get_network_session.html">get_network_session</a>
  
    <a class="method" href="method.WebView.get_page_id.html">get_page_id</a>
  
    <a class="method" href="method.WebView.get_session_state.html">get_session_state</a>
  
    <a class="method" href="method.WebView.get_settings.html">get_settings</a>
  
    <a class="method" href="method.WebView.get_theme_color.html">get_theme_color</a>
  
    <a class="method" href="method.WebView.get_title.html">get_title</a>
  
    <a class="method" href="method.WebView.get_tls_info.html">get_tls_info</a>
  
    <a class="method" href="method.WebView.get_uri.html">get_uri</a>
  
    <a class="method" href="method.WebView.get_user_content_manager.html">get_user_content_manager</a>
  
    <a class="method" href="method.WebView.get_web_extension_mode.html">get_web_extension_mode</a>
  
    <a class="method" href="method.WebView.get_website_policies.html">get_website_policies</a>
  
    <a class="method" href="method.WebView.get_window_properties.html">get_window_properties</a>
  
    <a class="method" href="method.WebView.get_wpe_view.html">get_wpe_view</a>
  
    <a class="method" href="method.WebView.get_zoom_level.html">get_zoom_level</a>
  
    <a class="method" href="method.WebView.go_back.html">go_back</a>
  
    <a class="method" href="method.WebView.go_forward.html">go_forward</a>
  
    <a class="method" href="method.WebView.go_to_back_forward_list_item.html">go_to_back_forward_list_item</a>
  
    <a class="method" href="method.WebView.is_controlled_by_automation.html">is_controlled_by_automation</a>
  
    <a class="method" href="method.WebView.is_editable.html">is_editable</a>
  
    <a class="method" href="method.WebView.is_loading.html">is_loading</a>
  
    <a class="method" href="method.WebView.is_playing_audio.html">is_playing_audio</a>
  
    <a class="method" href="method.WebView.load_alternate_html.html">load_alternate_html</a>
  
    <a class="method" href="method.WebView.load_bytes.html">load_bytes</a>
  
    <a class="method current" href="method.WebView.load_html.html">load_html</a>
  
    <a class="method" href="method.WebView.load_plain_text.html">load_plain_text</a>
  
    <a class="method" href="method.WebView.load_request.html">load_request</a>
  
    <a class="method" href="method.WebView.load_uri.html">load_uri</a>
  
    <a class="method" href="method.WebView.reload.html">reload</a>
  
    <a class="method" href="method.WebView.reload_bypass_cache.html">reload_bypass_cache</a>
  
    <a class="method" href="method.WebView.remove_frame_displayed_callback.html">remove_frame_displayed_callback</a>
  
    <a class="method" href="method.WebView.restore_session_state.html">restore_session_state</a>
  
    <a class="method" href="method.WebView.save.html">save</a>
  
    <a class="method" href="method.WebView.save_finish.html">save_finish</a>
  
    <a class="method" href="method.WebView.save_to_file.html">save_to_file</a>
  
    <a class="method" href="method.WebView.save_to_file_finish.html">save_to_file_finish</a>
  
    <a class="method" href="method.WebView.send_message_to_page.html">send_message_to_page</a>
  
    <a class="method" href="method.WebView.send_message_to_page_finish.html">send_message_to_page_finish</a>
  
    <a class="method" href="method.WebView.set_background_color.html">set_background_color</a>
  
    <a class="method" href="method.WebView.set_camera_capture_state.html">set_camera_capture_state</a>
  
    <a class="method" href="method.WebView.set_cors_allowlist.html">set_cors_allowlist</a>
  
    <a class="method" href="method.WebView.set_custom_charset.html">set_custom_charset</a>
  
    <a class="method" href="method.WebView.set_display_capture_state.html">set_display_capture_state</a>
  
    <a class="method" href="method.WebView.set_editable.html">set_editable</a>
  
    <a class="method" href="method.WebView.set_input_method_context.html">set_input_method_context</a>
  
    <a class="method" href="method.WebView.set_is_muted.html">set_is_muted</a>
  
    <a class="method" href="method.WebView.set_microphone_capture_state.html">set_microphone_capture_state</a>
  
    <a class="method" href="method.WebView.set_settings.html">set_settings</a>
  
    <a class="method" href="method.WebView.set_zoom_level.html">set_zoom_level</a>
  
    <a class="method" href="method.WebView.stop_loading.html">stop_loading</a>
  
    <a class="method" href="method.WebView.terminate_web_process.html">terminate_web_process</a>
  
    <a class="method" href="method.WebView.toggle_inspector.html">toggle_inspector</a>
  
    <a class="method" href="method.WebView.try_close.html">try_close</a>
  
  </div>
</div>

      <div class="section generator">
        <p>Generated by <a href="https://gitlab.gnome.org/GNOME/gi-docgen">gi-docgen</a> 2023.1</p>
      </div>
    </nav>

    <button id="btn-to-top" class="hidden"><span class="up-arrow"></span></button>

    
<section id="main" class="content">
  <header>
    <h3>Method</h3>
    <h1><a href="index.html">WPEWebKit</a><span class="sep"></span><a href="class.WebView.html">WebView</a><span class="sep"></span>load_html</h1>
  </header>

  <section>
    <div class="docblock">
      <p></p>
    </div>

    <div class="declaration toggle-wrapper">
      <h4 style="display:flex;" id="declaration">
        Declaration
        <a class="anchor" href="#declaration"></a>
        
        <a class="srclink" title="go to source location" href="https://github.com/WebKit/WebKit/tree/main/WebKitBuild/WPE/Release/DerivedSources/WebKit/wpe/WebKitWebView.h#L370">[src]</a>
        
      </h4>

      <div class="docblock c-decl">
        <pre><code><div class="highlight"><pre><span></span><span class="kt">void</span>
<span class="n">webkit_web_view_load_html</span><span class="w"> </span><span class="p">(</span>
<span class="w">  </span><span class="n">WebKitWebView</span><span class="o">*</span><span class="w"> </span><span class="n">web_view</span><span class="p">,</span>
<span class="w">  </span><span class="k">const</span><span class="w"> </span><span class="n">gchar</span><span class="o">*</span><span class="w"> </span><span class="n">content</span><span class="p">,</span>
<span class="w">  </span><span class="k">const</span><span class="w"> </span><span class="n">gchar</span><span class="o">*</span><span class="w"> </span><span class="n">base_uri</span>
<span class="p">)</span>
</pre></div>
</code></pre>
      </div>
    </div>

    <div class="description toggle-wrapper">
      <h4 style="display:flex;" id="description">
        Description
        <a class="anchor" href="#description"></a>
        
        <a class="srclink" title="go to source location" href="https://github.com/WebKit/WebKit/tree/main/Source/WebKit/UIProcess/API/glib/WebKitWebView.cpp#L3417">[src]</a>
        
      </h4>

      <div class="docblock">
        <p>Load the given <code>content</code> string with the specified <code>base_uri</code>.</p>
<p>If <code>base_uri</code> is not <code>NULL</code>, relative URLs in the <code>content</code> will be
resolved against <code>base_uri</code> and absolute local paths must be children of the <code>base_uri</code>.
For security reasons absolute local paths that are not children of <code>base_uri</code>
will cause the web process to terminate.
If you need to include URLs in <code>content</code> that are local paths in a different
directory than <code>base_uri</code> you can build a data <span class="caps">URI</span> for them. When <code>base_uri</code> is <code>NULL</code>,
it defaults to &#8220;about:blank&#8221;. The mime type of the document will be &#8220;text/html&#8221;.
You can monitor the load operation by connecting to <code>WebKitWebView::load-changed</code> signal.</p>
      </div>

      <div class="docblock">
        
        
        
        
        
        
      </div>

      
    </div>

    
    <div class="parameters toggle-wrapper">
      <h4 id="parameters">
        Parameters
        <a href="#parameters" class="anchor"></a>
      </h4>

      <div class="docblock">
        <dl class="arguments">
          
          <dt class="arg-name"><code>content</code></dt>
          <dd class="arg-description">
            <p><em>Type:</em>&nbsp;<code>const gchar*</code></p>
            <p><p>The <span class="caps">HTML</span> string to&nbsp;load.</p></p>
            <table>
            
            
            
            
            
            
            
            <tr><td title="transfer: none">The data is owned by the caller of the function.</td></tr>
            <tr><td>The value is a NUL terminated UTF-8 string.</td></tr>
            </table>
          </dd>
          
          <dt class="arg-name"><code>base_uri</code></dt>
          <dd class="arg-description">
            <p><em>Type:</em>&nbsp;<code>const gchar*</code></p>
            <p><p>The base <span class="caps">URI</span> for relative locations or <code>NULL</code>.</p></p>
            <table>
            
            <tr><td>The argument can be <code>NULL</code>.</td></tr>
            
            
            
            
            
            <tr><td title="transfer: none">The data is owned by the caller of the function.</td></tr>
            <tr><td>The value is a NUL terminated UTF-8 string.</td></tr>
            </table>
          </dd>
          

          
        </dl>
      </div>
    </div>
    

    

  </section>
</section>


    

    <section id="search" class="content hidden"></section>

    <footer>
    
    </footer>
  </div>
</body>
</html>