Guimauve wrote:With the new librairy, the WebGadget() finally work but I get a [WARNING] DEBUG: NP_Initialize succeeded
This WebKit warning is displayed if the embedding of scripting lanuages is enabled which is the WebKit default setting. By disabling the embedding of scripts the above warning will disappear:Fred wrote:It's a warning which comes from the lib, sounds more like a debug message than a warning anyway.
Code: Select all
#G_TYPE_INT = 6 << 2
ImportC "-lwebkitgtk-1.0"
webkit_web_settings_new()
webkit_web_view_set_settings(*WebkitWebView, *WebkitSettings)
EndImport
Define Value.GValue
OpenWindow(0, 200, 100, 600, 300, "WebGadget")
WebGadget(0, 10, 10, 580, 280, "http://www.purebasic.com")
; ----- Get current webkit settings
WebkitSettings = webkit_web_settings_new()
; ----- Disable embedding of scripting languages
Value\g_type = #G_TYPE_INT
g_value_set_int_(Value, 0)
g_object_set_property_(WebkitSettings, "enable-scripts", @Value)
; ----- Store changed settings
webkit_web_view_set_settings(GadgetID(0), WebkitSettings)
Repeat
Until WaitWindowEvent() = #PB_Event_CloseWindow