Downloads Compatibility Release Notes Editions Licensing Support Getting Started Configuration Samples mobileFX

WebKitX ActiveX for CEF3

This is a Visual Studio 2015 C++11 MFC/ATL x86 ActiveX that wraps Chromium Embedded Framework (CEF3) version 3.3202.1692 (December 2017) for use with OLE/COM languages. Chromium Embedded Framework encapsulates WebKit Blink HTML5 Renderer and Google V8 JavaScript VM Engine. This is a production-grade stable component for commercial use that will truly add HTML5 features in your Desktop and Terminal Applications.

Table of Contents

Key Features



Download complete installation package for Windows 7, 8, 10. Package includes WebKitX ActiveX, CEF 3.3202.1692 binaries,  HTML5 Editor VB6 Sample (both source / binary) and Microsoft x86 C++ 2015 Redistributable Package v.14.0.24123.

Download WebKitX version / 15 Dec 2018 Subscribe to New Version Notifications and Offers!
MD5: 43e651ef2e032ad566b7d1e4bca2c3f5 | SHA-1: 6a99d58fd3909e1e0e7fbb1cb635a74eff865b6a

Previous Versions:
Download WebKitX version
Download WebKitX version


Even though the control is promoted and supported only for Visual Basic 6.0 SP6, it is compatible with any OLE/COM capable Integrated Development Environments and x86 programming language. The following programming languages and IDE are reported to be compatible with WebKitX:

Release Notes

15 Dec 2018

12 Dec 2018

12 Nov 2018

12 Oct 2018

24 Sep 2018

18 Sep 2018

12 Sep 2018

12 Jul 2018

12 Jun 2018

12 May 2018

12 Apr 2018

18 Mar 2018

19 Feb 2018

12 Feb 2018

12 Jan 2018

Evaluation & Distribution


Download the setup package and install it in a place like C:\Program Files (x86)\WebKitX CEF3 ActiveX and you are ready to start using the component.


You are welcome to evaluate WebKitX for as long as you want and feel free to contact us with your questions, your suggestions and your bounties!  During evaluation, when opening a URL and at random intervals WebKitX displays a message box informing you that it is a commercial product and that it requires a License, but it wont prevent you from using all its features.

Commercial License Activation

If you own a commercial license of WebKitX ActiveX control, you need to add in your program your License Key.
Add this line in your code: WebKitX1.Activate "your@email", "yourkey"

Commercial Distribution

Creating a setup script to install WebKitX on a different computer should be straight-forward:

  1. Your script must copy the files of the C:\Program Files (x86)\WebKitX CEF3 ActiveX\bin folder to the other computer (list below).
    The destination folder is irrelevant and can be anywhere you choose.
  2. Your script must run Microsoft Visual C++ 2015 Redistributable Package (x86) for the Windows OS and Service Pack bundle of the other computer.
    For detailed information please see the WebKitX Runtime Dependencies paragraph above.
  3. Your script must register WebKitX ActiveX into the Windows Registry using this command: regsvr32 /s WebKitXCEF3.ocx
  4. If your product does not use Chrome DevTools, you may skip devtools_resources.pak to decrease size.
  5. If your product uses Flash Player you should add pepflashplayer32_29_0_0_113.dll (not included in WebKitX).

The binary payload of WebKitX consists of the following files and folders, all located in the ./bin folder:

WebKitX Runtime Dependencies

WebKitX requires Microsoft x86 C++ 2015 Runtime. During installation WebKitX setup will automatically install Microsoft x86 C++ 2015 Redistributable Package v.14.0.24123 for the following list of Windows Operating Systems:

Please note that OS-related compatibility issues are not subject to support and you must refer to Chromium Embedded Framework (CEF3) Operating System and Service Pack compatibility notes for aid.

What is Microsoft Visual C++ 2015 Redistributable Package?

Microsoft Visual C++ 2015 Redistributable installs run-time components of Visual C++ libraries. These components are required to run C++ applications that are developed using Visual Studio 2015 Update 3 RC and link dynamically to Visual C++ libraries. The packages can be used to run such applications on a computer even if it does not have Visual Studio 2015 installed. These packages also install run-time components of C Runtime (CRT), Standard C++, MFC, C++ AMP, and OpenMP libraries.Microsoft Visual C++ 2015 Redistributable includes bug fixes to the runtime DLLs and also the latest versions for KB 2999226. To find out what's new in Visual Studio 2015 Update 3 RC, see the Visual Studio 2015 Update 3 RC Release Notes.

WebKitX installation Fails. What can I do?

If during WebKitX installation you get an error message that WebKitXCEF3.ocx and cmax40.dll failed to register, it most certainly means that  Microsoft x86 C++ 2015 Redistributable Package failed to automatically install because the Windows OS version and/or its current Service Pack are not compatible with the included Microsoft x86 C++ 2015 Redistributable Package. You are advised to download Microsoft x86 C++ 2015 Redistributable Package for you Operating System and Service Pack bundle, and install it manually, from here: Microsoft Visual C++ 2015 Redistributable Update 3 RC.

Where can I find CEF3 binaries?

CEF3 binaries bundle can be also downloaded separately from here:
* WebKitX is tested and supported with cef_binary_3.3202.1692.g18a939d_windows32

WebKitX Editions

Which WebKitX edition do I need?

WebKitX ActiveX ships in two flavors: HTML5 Browser-only for adding HTML5 browsing capabilities in your applications, and HTML5 Browser & Editor for adding HTML5 What-You-See-Is-What-You-Get editing capabilities to your applications. For checking-out WebKitX editing features we recommend running the compiled sample HTML5 Editor.

WebKitX Browser Edition

Please note that HTML5 Browser Edition of WebKitX allows you to open URLs, read/write HTML5, receive  HTML5 events in your application, but it does not support HTML manipulation, nor JavaScript injection, nor JavaScript execution (Eval, AddScript, AddCode, JSCallback, DispatchEvent). The intended use of the Browser Edition of WebKitX is to render HTML5 from within your application such as Web Sites, WebGL Games, Help Files and Documentation, Sales and other Reports, RSS and News Feeds, HTML5 Videos, Facebook, Twitter tweets, PDF Files, Flash Content, etc.

WebKitX Editor & Browser Edition

If your application requires HTML5 manipulation, rich text editing, and/or JavaScript injection and execution, usage of Eval, AddScript, AddCode, JSCallback, DispatchEvent methods,  please consider using the HTML5 Browser & Editor edition of WebKitX. Despite being an HTML5 Editor, the control offers you its Editing API even in Browser Mode.

WebKitX Licensing

Desktop Application License

In a nutshell, a single License allows you to develop an unlimited number of Desktop Applications linked with WebKitX ActiveX control and distribute them freely to an unlimited number of your customers. The license excludes specific terminal-based applications that are subject to Terminal Application License below.

Edition Commercial Use Price Buy Now
WebKitX HTML5 Browser (x86) Yes £ 399
WebKitX HTML5 Editor (x86) Yes £ 999

Choose your License based on API usage

Below is a list of all WebKitX API Methods and Properties and the License required in order to call them at run-time. Please check carefully if the methods you require for your application are covered by the licensing you choose. Please do not hesitate to contact us at for assistance or clarifications.

API Method / Property Required License
CreateBrowser or Editor
RepaintBrowser or Editor
GetBrowserReadyBrowser or Editor
AddEventListenerBrowser or Editor
AddEventListenerExBrowser or Editor
RemoveEventListenerBrowser or Editor
RemoveEventListenerExBrowser or Editor
GethWndBrowser or Editor
GethWndBrowserBrowser or Editor
GetEventsBrowser or Editor
SetEventsBrowser or Editor
GetDownloadScriptsBrowser or Editor
GetIPC_TIMEOUT_MILLISBrowser or Editor
SetIPC_TIMEOUT_MILLISBrowser or Editor
GetASYNC_EVENTSBrowser or Editor
SetASYNC_EVENTSBrowser or Editor
GetFireOnEventForAllEventsBrowser or Editor
SetFireOnEventForAllEventsBrowser or Editor
SetDownloadScriptsBrowser or Editor
OpenBrowser or Editor
NavigateBackBrowser or Editor
NavigateForwardBrowser or Editor
StopLoadingBrowser or Editor
SaveHTMLBrowser or Editor
SavePDFBrowser or Editor
GetCurrentURLBrowser or Editor
GetURLBrowser or Editor
SetURLBrowser or Editor
GetBaseURLBrowser or Editor
SetBaseURLBrowser or Editor
GetHTMLBrowser or Editor
SetHTMLBrowser or Editor
PreviewBrowser or Editor
PrintBrowser or Editor
GetPreferenceBrowser or Editor
SetPreferenceBrowser or Editor
ShowDevToolsBrowser or Editor
DownloadBrowser or Editor
CancelDownloadBrowser or Editor
GetUndoEnabledBrowser or Editor
SetUndoEnabledBrowser or Editor

Do I need additional Licenses?

If your application is installed and executed on Windows Desktop operating systems such as Windows 7, 8, 10 and Windows Server editions, then you only need the Desktop Application License; to be absolutely clear about this, if your application is installed and executed on Windows Desktop operating systems such as Windows 7,8,10 and Windows Server editions, then you do not need Terminal Licenses.

You will need Terminal Licenses only if your application will be installed and executed on Windows Embedded operating systems, or executed under a Terminal Server.

Terminal Application License

Complementary to Desktop Application License are Terminal Licenses

A Terminal License is required if your application is deployed on a  Windows Embedded operating system or under a Terminal Server. A Terminal License must be obtained per terminal, on top of the Browser or Editor license. There are (3) types of terminal applications distinguished in the licensing terms:

The Point of Sales Terminal License is the General Purpose Terminal License for all terminal applications not explicitly stated in the list above.

Please contact us for Terminal License Volume Quotation.

Terminal License Commercial Use TermsIndicative Annual
OPEX Price
Volume License Quotation
Video Lottery Terminal License Yes CAPEX or OPEX£ 5
Contact us
Digital Signage Player License Yes CAPEX or OPEX£ 3
Contact us
Point of Sales Terminal License Yes CAPEX or OPEX£ 1
Contact us

Terminal Application License Premium Support Services

License Agreement

Please read carefully our license agreement and do not hesitate to contact us if you have questions, or if you need to negotiate special closures. 
mobileFX Software End-User License Agreement for WebKitX ActiveX Control

Can I upgrade my Browser License to Editor License?

Yes you can! you can upgrade your license within 15 days from purchase, paying only the difference. This upgrade service is only available for purchases made through our web site and not for purchases made by our distributors. Please contact for an upgrade.

Can I get the Source Code?

Yes you can! In fact we do not just give you the source code, we give you access to our git repository so that you can get all the latest fixes and features of our work in real-time.

Service Commercial Use Price
WebKitX Source Code Yes £ 25,000
Support Voucher / Bounty 1 hour £ 50

Ordering via Purchase Order (PO)

Alternative to automated PayPal order processing and only for company, school or university purchases, we offer a manual order processing and payment method via Purchase Order and IBAN wire transfer. Please create a Purchase Order (PO) document indicating the Software Name, Software EditionLicenses Quantity and/or Support Vouchers Quantity you wish to purchase. You must also provide company, school or university name, address, telephone and contact details. If your company, school or university is registered in a European Union member country you must provide in your PO your VAT number, if applicable. Please forward your PO to and upon processing you will receive payment instructions for IBAN Wire Transfer.

The typical process is:

  1. Send us a PO with the Software Edition, qty, your company, school or university details.
  2. We reply with quotation PDF and a Quotation Number.
  3. Your company makes the payment through IBAN wire transfer with the Quotation Number in description field.
  4. The Activation Keys are generated to Company Name. If you need them bound to an email, please specify this in PO.
  5. We send you the Activation Keys printed on the VAT invoice PDF.

Let us know if something different is required in the steps above.

Please do not hesitate to contact us for clarifications and assistance.

Support Services

What is Support Voucher / Bounty?

If you desperately need a new feature implemented in WebKitX or immediately need a hotfix and can't wait until next release, you can contact us at and negotiate with us a price, for which we will stop what we do and take care of what you need! The service is called a Bounty and applies only to existing Customers; for any edition of the ActiveX but only for its latest version (we do not branch per customer).

Just send us an email with what you need and our Account Manager will pass your request to our Tech Lead for Effort Estimation along with Technical Specs of the works to be done. Effort Estimation is in man hours and it is different from Duration. For example, to add a feature it might take our experts 8 hours to implement, but because we work on Sprints we might need a duration of one week to deliver.

The catch is that you participate in the process, being the primary Beta Tester! This phase is called User Acceptance Testing (UAT) and during this period you receive code-locked prototype revisions and provide us with valuable feedback, such as UAT observations and Defects. Once UAT is completed and you are satisfied with the result, you release us from the Bounty and we provide you with an Unlock Code as a token of our appreciation.

For corporate customers and long projects we collaborate using Jira.

WebKitX Architecture

WebKitX CEF3 ActiveX is a light-weight MFC ATL component for use with OLE/COM Programming Languages. At runtime the ActiveX starts CEF3XClient.exe process, passing to it its Window Handle (hWnd). 

CEF3XClient Process starts CEF3 Browser and Render sub-processes and establishes a seamless back-to-back Interprocess Communication Mechanism (IPC) between the ActiveX and all CEF3 processes. Chrome Browser is parented in ActiveX hWnd but lives in its own process.

All COM-based method and property calls between the ActiveX and CEF3XClients are marshalled using CoWaitForMultipleHandles, allowing your application's UI to be responsive. For time-consuming tasks, such as URL loading, COM events provide you callbacks when the tasks are finished. 

The important aspect of this architecture design is that all WebKit HTML5 rendering and V8 JavaScript execution are taking place outside your application, offering your application stability and isolation.

Getting Started


First you must activate WebKitX ActiveX by providing your License Key. If you are using early binding, a good place to do that is on Form_Load event. If you are using late binding you are advised to activate the control straight after its creation. This step applies only to license owners. During trial evaluation of WebKitX you may skip it.

WebKitX1_OnCreate(Settings, CommandLineSwitches)

Next you may control the creation of CEF3 Browser and Client Processes. OnCreate event provides you a Settings object that controls CEF3 Application and CEF3 Browser creation and initialization settings. The recommended defaults are preset in this object but you may want to provide your own settings such as Localization, Cache paths, Security settings, etc. The second parameter is CommandLineSwitches that are additional CEF3 preferences and even JavaScript flags that you want to provide to CEF3 Client Processes. 

For a list of command line switches please have a look here:

Default WebKitX CEF3 Command Line Switches


OnBrowserReady event notifies you that CEF3 processes and WebKitX control have been successfully created and the Interprocess Communication Mechanism (IPC) is established. At this point you can define secondary behavioral parameters such as focus control, formatting APIs, script downloading control, etc. but most importantly after OnBrowserReady event you can successfully start loading URLs for browsing or editing.


OnLoadEnd event is fired when your URL is completely downloaded. At this point you can enable HTML5 Editing or Preview (Browsing) and set the HTML DOM events you want WebKitX to subclass for every HTML Element on the document. After you receive this event you can start using the Selection and Formatting APIs.

Page Loading Events for IFRAME elements

WebKitX generates OnLoadStart, OnLoadEnd and OnLoadError events when loading a page. As of version WebKitX generates those events only for the Main Window Frame and offers IFRAME support with two new events, OnPageLoadStart and OnPageLoadEnd that provide the IFRAME id, name and URL that generates the events.

Example Loading a Single Page:

	22:49:02 OnBeforeNavigate 1, 2, , about:blank,
	22:49:02 WebKitX1_OnLoadStart:
	22:49:02 OnPageLoadStart: FrameID=2, FrameName=, URL=, Transition=1
	22:49:02 Saved Undo 0
	22:49:02 OnPageLoadEnd: FrameID=2, FrameName=, URL=, HTTP=200
	22:49:02 WebKitX1_OnLoadEnd:	

Example Loading a Page with several IFRAME elements:

	22:50:29 OnBeforeNavigate 1, 3, , file:///D:/mobileFX/Projects/Software/WebKitX/ActiveX/VBSample/Editor/index.html,
	22:50:29 WebKitX1_OnLoadStart:
	22:50:29 OnPageLoadStart: FrameID=3, FrameName=, URL=, Transition=1
	22:50:29 AST library loaded: 0.19.0
	22:50:30 OnPageLoadStart: FrameID=4, FrameName=iframe_wetter-iframe, URL=about:blank, Transition=3
	22:50:30 Saved Undo 0
	22:50:30 OnPageLoadEnd: FrameID=4, FrameName=iframe_wetter-iframe, URL=about:blank, HTTP=0
	22:50:30 OnPageLoadStart: FrameID=5, FrameName=iframe_iframe-bundesliga-1-spieltags-live-leiste, URL=about:blank, Transition=3
	22:50:30 Saved Undo 1
	22:50:30 OnPageLoadEnd: FrameID=5, FrameName=iframe_iframe-bundesliga-1-spieltags-live-leiste, URL=about:blank, HTTP=0
	22:50:30 This page is not reloaded
	22:50:30 window.performance work's fine on this browser
	22:50:30 OnBeforeNavigate 1, -4, , ,
	22:50:30 OnBeforeNavigate 1, -4, , ,
	22:50:30 [Report Only] Refused to load the image 'https:' because it violates the following Content Security Policy directive: "img-src https: blob: data: android-webview-video-poster:".	
	22:50:30 OnBeforeNavigate 1, -4, , ,;src=8468614;type=bildd0;cat=bildd00;u1=%2F;u4=Home;ord=9238740796052.613?
	22:50:30 OnBeforeNavigate 1, -4, , ,;src=8468614;type=bildd0;cat=bildd0;u4=Home;u1=%2F;ord=8208939351270.605?
	22:50:31 OnPageLoadStart: FrameID=4, FrameName=iframe_wetter-iframe, URL=, Transition=3
	22:50:31 window.performance work's fine on this browser
	22:50:31 This page is not reloaded
	22:50:31 OnPageLoadStart: FrameID=5, FrameName=iframe_iframe-bundesliga-1-spieltags-live-leiste, URL=, Transition=3
	22:50:31 Synchronous XMLHttpRequest on the main thread is deprecated because of its detrimental effects to the end user's experience. For more help, check
	22:50:31 OnBeforeNavigate 1, -4, , ,;dc_pre=CPr7jZbbot8CFcsT0wodZzYLRQ;src=8468614;type=bildd0;cat=bildd00;u1=%2F;u4=Home;ord=9238740796052.613?
	22:50:31 OnBeforeNavigate 1, -4, , ,;dc_pre=CJSVjpbbot8CFc4X0wodShsG5Q;src=8468614;type=bildd0;cat=bildd0;u4=Home;u1=%2F;ord=8208939351270.605?
	22:50:31 OnPageLoadStart: FrameID=8, FrameName=, URL=;dc_pre=CPr7jZbbot8CFcsT0wodZzYLRQ;src=8468614;type=bildd0;cat=bildd00;u1=%2F;u4=Home;ord=9238740796052.613?, Transition=3
	22:50:31 OnPageLoadStart: FrameID=10, FrameName=, URL=;dc_pre=CJSVjpbbot8CFc4X0wodShsG5Q;src=8468614;type=bildd0;cat=bildd0;u4=Home;u1=%2F;ord=8208939351270.605?, Transition=3
	22:50:32 This page is not reloaded
	22:50:32 window.performance work's fine on this browser
	22:50:32 OnPageLoadEnd: FrameID=7, FrameName=, URL=;dc_pre=CJSVjpbbot8CFc4X0wodShsG5Q;src=8468614;type=bildd0;cat=bildd0;u4=Home;u1=%2F;ord=8208939351270.605?, HTTP=-3
	22:50:32 OnPageLoadEnd: FrameID=4, FrameName=iframe_wetter-iframe, URL=, HTTP=200
	22:50:32 OnPageLoadStart: FrameID=10, FrameName=, URL=about:blank, Transition=3
	22:50:32 OnPageLoadEnd: FrameID=10, FrameName=, URL=about:blank, HTTP=0
	22:50:32 This page is not reloaded
	22:50:32 window.performance work's fine on this browser
	22:50:32 Saved Undo 2
	22:50:32 OnPageLoadEnd: FrameID=6, FrameName=, URL=;dc_pre=CPr7jZbbot8CFcsT0wodZzYLRQ;src=8468614;type=bildd0;cat=bildd00;u1=%2F;u4=Home;ord=9238740796052.613?, HTTP=-3
	22:50:32 Saved Undo 3
	22:50:32 OnPageLoadEnd: FrameID=5, FrameName=iframe_iframe-bundesliga-1-spieltags-live-leiste, URL=, HTTP=200
	22:50:32 OnPageLoadStart: FrameID=11, FrameName=, URL=about:blank, Transition=3
	22:50:32 OnBeforeNavigate 1, -4, , ,
	22:50:32 OnPageLoadStart: FrameID=11, FrameName=, URL=, Transition=3
	22:50:32 Saved Undo 4
	22:50:32 OnPageLoadEnd: FrameID=11, FrameName=, URL=about:blank, HTTP=0
	22:50:32 Saved Undo 5
	22:50:32 OnPageLoadEnd: FrameID=12, FrameName=, URL=, HTTP=-3
	22:50:33 OnPageLoadStart: FrameID=14, FrameName=, URL=about:blank, Transition=3
	22:50:33 Saved Undo 6
	22:50:33 OnPageLoadEnd: FrameID=14, FrameName=, URL=about:blank, HTTP=0
	22:50:33 a: 0.00732421875ms
	22:50:33 'webkitURL' is deprecated. Please use 'URL' instead.
	22:50:35 Visitor Service Callback
	22:50:35 Saved Undo 7
	22:50:35 OnPageLoadEnd: FrameID=3, FrameName=, URL=, HTTP=200
	22:50:35 WebKitX1_OnLoadEnd:

Behavior Configuration IMPORTANT NOTES

Enabling JavaScript 

Please note that in WebKitX downloading script tags is disabled by default because in editor mode JavaScript execution often messes with HTML5 styles, especially if you are using features such as Parallax Scrolling and JavaScript-aided responsive layouts. If you want to download and execute JavaScript you must explicitly enable it using  WebKitX1.DownloadScripts = True in OnBrowserReady() event handler, as illustrated in code fragment below. 

As a side note, in editor edition of WebKitX you can execute JavaScript at run-time using Eval, AddScript, AddCode and ExecuteCommand methods, even if DownloadScripts is false. The key difference is download-time and run-time JavaScript execution and WebKitX DownloadScripts parameter controls download-time JavaScript and not run-time JavaScript.

Setting HTML5 by code at Runtime

WebKitX offers your two ways to load HTML: either by WebKitX.Open() method or by WebKitX.HTML property. Please note that providing a URL is recommended for successfully downloading relative resources such as Images, Style Sheets, Scripts, etc. If however you need to use the WebKitX.HTML property you first need to set a fake-but-valid URL and BaseURL. Chromium Embedded Framework Browser requires a valid URL page before you can inject HTML and/or JavaScript by code at run-time. To do so please use the WebKitX.URL and WebKitX.BaseURL properties before you use the WebKitX.HTML property.

Disabling GPU

In WebKitX GPU Hardware Acceleration is enabled by default. However, there are cases that you might need to host your application in a Virtualized environment such as VMware, Citrix or Virtual Box where GPU emulation is not available. You may disable GPU by handling the OnCreate() event and adding --disable-gpu --disable-webgl --disable-3d-apis --disable-gpu-compositing in CommandLineSwitches and setting Settings.webgl = False.

Setting CEF3 Preferences at Runtime

WebKitX offers GetPreference() and SetPreference() methods to read / modify CEF3 preferences at run-time. Please note that setting preferences causes CEF browser to recreate and it is time-costly, so use it with caution, especially when synchronizing WebKitX HTML with a Code Editor (like HTML5 Pad does). For example to enable / disable Spell Checking, WebKitX uses an internal Boolean latch in order to avoid browser recreation and you should use WebKitX1.SpellChecking = true instead of SetPreference("browser.enable_spellchecking", "true").

For a list of preference please have a look here:

WebKitX Plugins

WebKitX plugins are disabled by default in both Browser and Editor editions. To enable plugins you need to handle the OnCreate event and set Settings.plugins = True as illustrated below:

PDF Viewer Plugin

When plugins are disabled PDF files will download as regular files rather than render on the screen. To enable PDF Viewer you need to handle the OnCreate event and set Settings.plugins = True.

Flash Player Plugin

To enable Flash player you need to download a x86 version of pepflashplayer.dll and provide the path to it by setting the Settings.flash_player_dll_path property in OnCreate() event, as illustrated below. If you copy the DLL in the ActiveX folder then you do not need to provide the full path. If you decide to install the DLL in a different folder you should provide the path with forward slashes (unix-style paths).

WebKitX is tested with pepflashplayer32_29_0_0_113.dll

Chrome DevTools Plugin

Chrome DevTools is a set of web developer tools built directly into the Google Chrome browser. DevTools can help you diagnose problems quickly, which ultimately helps you build better websites, faster.

Calling JavaScript

Calling JavaScript Functions by Name - CallByName()

The simplest way to call a JavaScript function in WebKitX is WebKitX.CallByName(Name, Variant) method. You can pass to JavaScript function arbitrary arguments using an OLE/COM Variant, and receive the function's result value, as an OLE/COM Variant too. Execution of CallByName is IPC-synchronous and this method is an elegant alternative to WebKitX.Eval() code as you can pass back-and-forth your variables without stringifying them. For more information about this mechanism have a look in OLE/COM Variants to V8 Values Conversion.

Calling JavaScript Functions for a Specific Execution Context -  JSCallback()

WebKitX JavaScript Callbacks is a mechanism to register and call JavaScript functions by name, within a specific V8 JavaScript Execution Context. The key difference from CallByName() is that CallByName can only invoke functions registered in the Global Scope of the Main Window, where as JavaScript Callbacks allow you to call functions registered in any scope and window.

Registering JavaScript Callbacks

Each frame in a browser window has its own V8 context. The context defines the scope for all variables, objects and functions defined in that frame. WebKitX allows you to register a JavaScript callback in a V8 context using window.register(name, callback, this) method. The first argument is the string name of the function, the second is the function callback and the 3rd optional parameter is the execution context. If the 3rd parameter is not defined then the global object is assumed.

Invoking JavaScript Callbacks

To invoke the JavaScript callback you simply need to call WebKitX.JSCallback(name, params, async) method passing the name of the JavaScript function you want to invoke and a Variant with the arguments. For critical real-time applications you should set async parameter to True, which executes the IPC call synchronously. The result depends on the JavaScript function and can be either a scalar value or a variant array of variants.

OLE/COM Variants to V8 Values Conversion EXPERIMENTAL

WebKitX has a powerful OLE/COM Variant to Google V8 Value bi-directional converter that works both for Scalar and Array values, including nested array values (arrays of arrays of variants). This conversion mechanism is available to any WebKitX method transmitting and/or returning an OLE/COM Variant, such as CallByName(), JSCallBack() and DispatchEvent().

WebKitX can serialize variant scalars VT_BSTR, VT_UINT, VT_INT, VT_NULL, VT_BOOL, VT_R4, VT_R8, VT_CY, VT_DATE as well as variant safearray of variants VT_ARRAY|VT_VARIANT and even typed arrays VT_ARRAY|VT_BSTR, VT_ARRAY|VT_UINT, VT_ARRAY|VT_INT, VT_ARRAY|VT_BOOL, VT_ARRAY|VT_R4, VT_ARRAY|VT_R8, VT_ARRAY|VT_CY, VT_ARRAY|VT_DATE to Google V8 value objects. Currently serialization of VT_DISPATCH is not supported and therefore you cannot pass OLE/COM Objects to JavaScript.

On the OLE/COM side, to pass multiple arguments to a JavaScript callback function you need to wrap them in a Variant Array of Variants.

On the JavaScript side, you can return V8 Scalar or V8 Array values to OLE/COM side, including nested V8 Arrays. WebKitX can serialize V8 scalar Boolean, Number, String, Null, Date values and Array of [Boolean or Number or String or Null or Date or Array] V8 values. Google V8 Arrays are always returned as Variant Arrays of Variants.

On the receiving OLE/COM side the scalars are converted to a Variant of equivalent scalar type and Arrays are converted into a Variant Array of Variants.

HTML5 DOM to COM Events

Selector based API

WebKitX provides you access to  HTML5 DOM through a robust  CSS3 selector-based API (Selector example td:nth-of-type(3) > span:first-child Selectors are used as arguments in editing and styling method calls and as targets in events. The ActiveX provides the selector of the currently selected element and the begin and end nodes of the current selection: ActiveElement, SelAnchorElement, SelFocusElement.

Asynchronous DOM to COM Events

HTML5 DOM Events are generated by WebKit Blink Engine and are copied into an immutable format before they are transmitted from CEFXClient process to WebKitX ActiveX. Once WebKitX ActiveX receives an event notification through IPC, it fires a COM Event with the copied data of HTML DOM event. Thus, CEFXClient process does not block waiting for your client code to handle the event. WebKitX DOM Events are Immutable, meaning that you can only read event data but you cannot cancel events, stop them from bubbling or prevent default behavior. 

Synchronous DOM to COM Events

WebKitX as of version supports synchronous DOM to COM events by implementing CefMessageRouter circuit. Events generated from WebKit Blink Engine are serialized and passed from Rendering to Browser process, which transmits them to the ActiveX. The browser process waits for the ActiveX to handle the event, where you can also cancel event bubble or prevent event's default behavior.

Please note that blocking Inter-process Communication (IPC) between 3 processes is not advisable for casual event handling and you should do so only if you need to cancel specific events. Synchronous DOM to COM Events are thread-safe and care has been placed in order to support this feature seamlessly in single-threaded Applications without deadlocks. For that purpose, synchronous events are serialized using mutex synchronization on entry, meaning that synchronous events occupy the IPC channel one at a time. Please contact us for more implementation details or if you need a different handling of DOM to COM events.

Listening to DOM Events

You can use addEventListener and removeEventListener for attaching and detaching on HTML DOM events. WebKitX offers two methods:

The signature of the public methods is defined by OnEvent() event which is:

EventData are a JSON string representation of DOM Event:

{ "eventName": "click", "eventType": "[object MouseEvent]", "altKey": false, "bubbles": true, "button": 0, "buttons": 0, "cancelBubble": false, "cancelable": true, "clientX": 86, "clientY": 178, "composed": true, "ctrlKey": false, "currentTarget": "", "defaultPrevented": false, "detail": 1, "eventPhase": 1, "fromElement": "", "isTrusted": true, "layerX": 86, "layerY": 178, "metaKey": false, "movementX": 0, "movementY": 0, "offsetX": 86, "offsetY": 89, "originalTarget": "", "pageX": 86, "pageY": 178, "path": "#lga", "relatedTarget": "", "returnValue": true, "screenX": 566, "screenY": 415, "shiftKey": false, "srcElement": "#lga", "sourceCapabilities": {}, "target": "#lga", "timeStamp": 8625.205000000002, "toElement": "#lga", "type": "click", "which": 1, "x": 86, "y": 178, "region": null, }
{ "eventName": "mousemove", "eventType": "[object MouseEvent]", "altKey": false, "bubbles": true, "button": 0, "buttons": 0, "cancelBubble": false, "cancelable": true, "clientX": 136, "clientY": 1, "composed": true, "ctrlKey": false, "currentTarget": "", "defaultPrevented": false, "detail": 0, "eventPhase": 1, "fromElement": "", "isTrusted": true, "layerX": 136, "layerY": 1, "metaKey": false, "movementX": -1, "movementY": -2, "offsetX": 136, "offsetY": 1, "originalTarget": "", "pageX": 136, "pageY": 1, "path": "#viewport", "relatedTarget": "", "returnValue": true, "screenX": 616, "screenY": 238, "shiftKey": false, "srcElement": "#viewport", "sourceCapabilities": {}, "target": "#viewport", "timeStamp": 276604.28, "toElement": "#viewport", "type": "mousemove", "which": 0, "x": 136, "y": 1, "region": null, }

DOM Events Handling Example

WebKitX Events Sample demonstrates handling DOM events and reading values from Input elements. In the following code fragment are demonstrated the three (3) different methods you can use. The generic method, the AddressOf method that requires a Module, and the IDispatch method that requires an Object. The sample loads a INPUT element and a BUTTON and when you click the button it fires an event which is handled by VB6. The event handler code in VB6 uses WebKitX API to read the value of the INPUT.

Firing Custom HTML5 Events - DispatchEvent()

WebKitX DispatchEvent() method allows you to fire DOM events directly into JavaScript and handle those events by JavaScript event handlers. You can pass the target selector that will receive the event, the event name, event initialization parameters (bubbling, cancelable, composed) and an OLE/COM Variant that will be converted into a V8 JavaScript object and added in the details field of the Event object. Event execution can be both synchronous and asynchronous in terms of IPC tunneling, and it is always synchronous in terms of DOM.

WebKitX HTML5 Editor

There are some best practices when using WebKitX as an HTML5 Editor:

Disabling JavaScript download

Disabling scripts downloading is advisable when using WebKitX as an Editor because JavaScript execution often messes with HTML5 styles, especially if you are using features such as Parallax Scrolling and JavaScript-aided responsive layouts.

Detecting Edit Mode from JavaScript

There are cases where your JavaScript code might need to detect if WebKitX is in Edit mode. To do that simply read window.__WEBKITX_EDITABLE__ variable. You should wrap Google Analytics and Google Tags Manager initialization code inside a conditional block and download Google scripts (or any other script) by URL, as illustrated below:

Getting HTML Source

To retrieve HTML5 source as a String you can use WebKitX.HTML property. 

Getting XHTML Source

You can configure WebKitX to return XHTML instead of HTML by setting Settings.enable_xml_html = true in OnCreate() event handler. This setting enables DOM parsing by XMLSerializer that trans-codes your HTML into XML. The output results in better structured and faster parsed documents but XMLSerializer also encodes the source code of <script> elements; in particular  XMLSerializer HTML-Encodes any Entity Character such as ampersand (&) to &amp;, less than (<) to &lt;, grater than (>) to &gt;, etc. You should make sure that all your <script> elements are referenced and not embedded.

Using WebKitX with MDI Forms

MDI Forms in most programming languages suffer from flickering effects. When using WebKitX in an MDI child Form, you may notice rendering problems when MDI children overlap each other during resizing or moving. To treat this problem you need to add WebKitX.SetMDIWindow(hWND) in every MDI child Form that uses WebKitX control. The call installs a window sub-class hook that detects WM_WINDOWPOSCHANGING and  WM_MOVING messages and repaints the entire MDI Form. In order to avoid further flickering and redundant repaints, WebKitX uses Timer that absorbs repeated WM_WINDOWPOSCHANGING and WM_MOVING messages. For SetMDIWindow() to work, the WebKitX control must be directly placed inside an MDI Child Form and must not be contained inside another control (such as a TabStrip).

Overlapping Form Controls (re-positioning / re-z-indexing)

When you place WebKitX control inside a TabStrip control you must control its Visibility in order to avoid rendering problems. Most TabStrip controls during page selection, instead of toggling the visibility of the pages and/or their contained controls, they simply re-position the inactive controls in a non-visible area or re-position the controls along the z-axis. However, CEF3 window is an out-of-process overlay window on-top of WebKitX COleControl window and re-positioning or re-z-indexing form controls can cause rendering problems to WebKitX and other controls in your form too.

To avoid this problem as of version WebKitX does not resize/re-position CEF3 browser window if WebKitX control is invisible (WebKitX.Visible = False). However, there is a best practice you must follow in order to achieve the desired behavior: you need to control WebKitX visibility by code, as illustrated below. Also, we have added WebKitX.SetAutoResize(Enable) method to explicitly enable or disable CEF3 resize/re-position. Please note that to force WebKitX / CEF3 to resize/re-position after they become visible again, you must call WebKitX.Repaint() method.

The problem described does not appear only with TabStrip controls; the same defect appears if you have custom control layouting implementation in your Forms that re-positions controls or re-indexes controls z-index.

Content Filtering EXPERIMENTAL


WebKitX Content Filtering is a mechanism that allows you to remove HTTP Response Headers, such as Content Security Policy (CSP) response header, and alter or remove Cross Origin Resource Sharing (CORS) response header. WebKitX implements in CEF3 Client I/O Thread a custom Resource Handler that intercepts normal HTTP and HTTPS requests and spawns a light-weight object that downloads the resource instead. Once the HTTP Response Headers for a particular resource are available, they are being filtered-out and passed to the IO thread for further processing. 

This mechanism works for the following HTTP methods: GET, POST, HEAD, DELETE and PUT, and works for any MIME type resource. WebKitX content filtering works both with HTTP and HTTPS requests, meaning that it works perfectly with server-side SSL encryption, but it does not work if client-side SSL authentication is enabled. Please read further below for more information about Microsoft IIS Client SSL certificate configuration.

Overwrite Cross-Origin Resource Sharing (CORS)

Cross-Origin Resource Sharing (CORS) is a mechanism that uses additional HTTP headers to tell a browser to let a web application running at one origin (domain) have permission to access selected resources from a server at a different origin. A web application makes a cross-origin HTTP request when it requests a resource that has a different origin (domain, protocol, and port) than its own origin.

An example of a cross-origin request: The frontend JavaScript code for a web application served from uses XMLHttpRequest to make a request for

For security reasons, browsers restrict cross-origin HTTP requests initiated from within scripts. For example, XMLHttpRequest and the Fetch API follow the same-origin policy. This means that a web application using those APIs can only request HTTP resources from the same origin the application was loaded from, unless the response from the other origin includes the right CORS headers.

The CORS mechanism supports secure cross-origin requests and data transfers between browsers and web servers. Modern browsers use CORS in an API container such as XMLHttpRequest or Fetch to help mitigate the risks of cross-origin HTTP requests.

This cross-origin sharing standard is used to enable cross-site HTTP requests for:

To enable CORS, you need to configure your web server to return the Access-Control-Allow-Origin HTTP header:
Access-Control-Allow-Origin: *
Access-Control-Allow-Origin: <origin>

In WebKitX you can overwrite web server's Access-Control-Allow-Origin  by handling the OnCreate() event and setting Settings.filter_response = true and Settings.access_control_allow_origin to "*" or the domain you wish to allow.

Overwrite Content Security Policy (CSP)

WebKitX due to JavaScript injection features and extensive use of eval(), both in Browser and Editor editions, requires Content Security Policy (CSP) to be suppressed. If you try to load a URL with CSP enabled in WebKitX, it will result in a series of error messages related to unsafe-eval, like the one below:

Content Security Policy (CSP) is an added layer of security that helps to detect and mitigate certain types of attacks, including Cross Site Scripting (XSS) and data injection attacks. These attacks are used for everything from data theft to site defacement or distribution of malware. CSP is designed to be fully backward compatible. Browsers that don't support it still work with servers that implement it, and vice-versa: browsers that don't support CSP simply ignore it, functioning as usual, defaulting to the standard same-origin policy for web content. If the site doesn't offer the CSP header, browsers likewise use the standard same-origin policy.

To enable CSP, you need to configure your web server to return the Content-Security-Policy HTTP header (sometimes you will see mentions of the X-Content-Security-Policy header, but that's an older version and you don't need to specify it anymore).

In WebKitX you can overwrite web server's Content-Security-Policy by handling the OnCreate() event and setting Settings.filter_response = true and Settings.remove_response_headers to "x-webkit-csp,content-security-policy,x-content-security-policy". The same feature can be used to remove any other response header.

Some sites stop loading after enabling Content Filtering

WebKitX Content Filtering features and SSL Client Certificate enabled on your Web Server cannot work together. You must either disable WebKitX Content Filtering or disable SSL Client Certificate on your Web Server, as illustrated below:

Page Encoding problems with early implementation of Content Filtering

CEF 3.3202.1692 ignores Content-Type charset option when using custom CefResourceHandler, causing pages such as or to render with unreadable characters. [bug link]. To treat this problem, WebKitX Content Filtering enforces UTF-8 BOM insertion in text/plain, text/html, application/json, application/javascript, application/ecmascript, text/css, text/xml MIME types. Please note that the bug appears only if content filtering is enabled and does not affect normal (unfiltered) browsing or editing. The plan about this bug is to switch to newer version of CEF3 on January 2019.

Loading with content filtering with version

Loading with content filtering with version (Sep 2018) and later:

General Trouble Shooting IMPORTANT NOTES

WebKitX installation Fails

If during WebKitX installation you get an error message that WebKitXCEF3.ocx and cmax40.dll failed to register, it most certainly means that  Microsoft x86 C++ 2015 Redistributable Package failed to automatically install because the Windows OS version and/or its current Service Pack are not compatible with the included Microsoft x86 C++ 2015 Redistributable Package. You are advised to download Microsoft x86 C++ 2015 Redistributable Package for you Operating System and Service Pack bundle, and install it manually, from here: Microsoft Visual C++ 2015 Redistributable Update 3 RC.

Nothing Paints on my Form

WebKitX ActiveX provides OLE Control Host Window Handle (HWND) to Chromium Embedded Framework (CEF3), which in turn paints the HTML5 composite image to the OLE Control Host Device Context (HDC). This mechanism requires you to Disable Double Buffering Features of the Host Form or OLE Control Host. Furthermore please make sure you set the scale mode of your Host Form or OLE Control Host to Pixels.

I get unsafe-eval error messages

WebKitX due to JavaScript injection features and extensive use of Eval(), both in Browser and Editor editions, requires Content Security Policy (CSP) to be suppressed. If you try to load a site with CSP enabled in WebKitX, it will result in a series of error messages related to unsafe-eval. Please refer to Content Filtering article above for information how to by-pass CSP in WebKitX.

My Web Site does not load

WebKitX Content Filtering features and SSL Client Certificate enabled on your Web Server cannot work together, by design. You must either disable WebKitX Content Filtering or disable SSL Client Certificate on your Web Server. Please note this has nothing to do with HTTPS. For more information please refer to Content Filtering chapter.

WebKitX COM Interfaces

// WebKitXCEF3.idl : type library source for ActiveX Control project.

// This file will be processed by the MIDL compiler tool to
#include <olectl.h>
#include <idispids.h>

import "ocidl.idl";
import "oaidl.idl";

	helpstring("mobileFX WebKitX CEF3 ActiveX")
library WebKitXCEF3Lib

	typedef enum DOM_EVENTS
		DOM_EVENT_NONE							= 0,
		DOM_EVENT_CLICK							= 1,
		DOM_EVENT_MOUSE_UP						= 16,
		DOM_EVENT_KEY_DOWN						= 32,
		DOM_EVENT_KEY_PRESS						= 64,
		DOM_EVENT_KEY_UP						        = 128,
		DOM_EVENT_CUT							= 256,
		DOM_EVENT_COPY							= 512,
		DOM_EVENT_PASTE							= 1024,
		DOM_EVENT_SELECT						        = 2048,


		CustomEvent = 0,

	typedef enum DOM_NODE_TYPES

	typedef enum NAV_RESOURCE_TYPE

	typedef enum NAV_TRANSITION_TYPE 
		TT_LINK = 0,
		TT_RELOAD = 8,
		TT_BLOCKED_FLAG = 0x00800000,
		TT_FORWARD_BACK_FLAG = 0x01000000,
		TT_CHAIN_START_FLAG = 0x10000000,
		TT_CHAIN_END_FLAG = 0x20000000,
		TT_IS_REDIRECT_MASK = 0xC0000000,

	typedef enum EDIT_COMMANDS

		// CEFX	- Table

		// CEFX - Selection




		// CEFX Other


		helpstring("mobileFX WebKitX for CEF3"),
	interface ISettings : IDispatch
		[propget, id(2)] HRESULT accept_language_list([out, retval] BSTR* pVal);
		[propput, id(2)] HRESULT accept_language_list([in] BSTR newVal);
		[propget, id(3)] HRESULT cache_path([out, retval] BSTR* pVal);
		[propput, id(3)] HRESULT cache_path([in] BSTR newVal);
		[propget, id(4)] HRESULT command_line_args_disabled([out, retval] LONG* pVal);
		[propput, id(4)] HRESULT command_line_args_disabled([in] LONG newVal);
		[propget, id(5)] HRESULT enable_net_security_expiration([out, retval] LONG* pVal);
		[propput, id(5)] HRESULT enable_net_security_expiration([in] LONG newVal);
		[propget, id(6)] HRESULT framework_dir_path([out, retval] BSTR* pVal);
		[propput, id(6)] HRESULT framework_dir_path([in] BSTR newVal);
		[propget, id(7)] HRESULT ignore_certificate_errors([out, retval] LONG* pVal);
		[propput, id(7)] HRESULT ignore_certificate_errors([in] LONG newVal);
		[propget, id(8)] HRESULT javascript_flags([out, retval] BSTR* pVal);
		[propput, id(8)] HRESULT javascript_flags([in] BSTR newVal);
		[propget, id(9)] HRESULT locale([out, retval] BSTR* pVal);
		[propput, id(9)] HRESULT locale([in] BSTR newVal);
		[propget, id(10)] HRESULT locales_dir_path([out, retval] BSTR* pVal);
		[propput, id(10)] HRESULT locales_dir_path([in] BSTR newVal);
		[propget, id(11)] HRESULT log_file([out, retval] BSTR* pVal);
		[propput, id(11)] HRESULT log_file([in] BSTR newVal);
		[propget, id(12)] HRESULT persist_session_cookies([out, retval] LONG* pVal);
		[propput, id(12)] HRESULT persist_session_cookies([in] LONG newVal);
		[propget, id(13)] HRESULT persist_user_preferences([out, retval] LONG* pVal);
		[propput, id(13)] HRESULT persist_user_preferences([in] LONG newVal);
		[propget, id(14)] HRESULT remote_debugging_port([out, retval] LONG* pVal);
		[propput, id(14)] HRESULT remote_debugging_port([in] LONG newVal);
		[propget, id(15)] HRESULT resources_dir_path([out, retval] BSTR* pVal);
		[propput, id(15)] HRESULT resources_dir_path([in] BSTR newVal);
		[propget, id(16)] HRESULT uncaught_exception_stack_size([out, retval] LONG* pVal);
		[propput, id(16)] HRESULT uncaught_exception_stack_size([in] LONG newVal);
		[propget, id(17)] HRESULT user_agent([out, retval] BSTR* pVal);
		[propput, id(17)] HRESULT user_agent([in] BSTR newVal);
		[propget, id(18)] HRESULT user_data_path([out, retval] BSTR* pVal);
		[propput, id(18)] HRESULT user_data_path([in] BSTR newVal);
		[propget, id(19)] HRESULT application_cache([out, retval] BSTR* pVal);
		[propput, id(19)] HRESULT application_cache([in] BSTR newVal);
		[propget, id(20)] HRESULT cursive_font_family([out, retval] BSTR* pVal);
		[propput, id(20)] HRESULT cursive_font_family([in] BSTR newVal);
		[propget, id(21)] HRESULT background_color([out, retval] OLE_COLOR* pVal);
		[propput, id(21)] HRESULT background_color([in] OLE_COLOR newVal);
		[propget, id(22)] HRESULT databases([out, retval] VARIANT_BOOL* pVal);
		[propput, id(22)] HRESULT databases([in] VARIANT_BOOL newVal);
		[propget, id(23)] HRESULT default_encoding([out, retval] BSTR* pVal);
		[propput, id(23)] HRESULT default_encoding([in] BSTR newVal);
		[propget, id(24)] HRESULT default_fixed_font_size([out, retval] LONG* pVal);
		[propput, id(24)] HRESULT default_fixed_font_size([in] LONG newVal);
		[propget, id(25)] HRESULT default_font_size([out, retval] LONG* pVal);
		[propput, id(25)] HRESULT default_font_size([in] LONG newVal);
		[propget, id(26)] HRESULT fantasy_font_family([out, retval] BSTR* pVal);
		[propput, id(26)] HRESULT fantasy_font_family([in] BSTR newVal);
		[propget, id(27)] HRESULT file_access_from_file_urls([out, retval] VARIANT_BOOL* pVal);
		[propput, id(27)] HRESULT file_access_from_file_urls([in] VARIANT_BOOL newVal);
		[propget, id(28)] HRESULT fixed_font_family([out, retval] BSTR* pVal);
		[propput, id(28)] HRESULT fixed_font_family([in] BSTR newVal);
		[propget, id(29)] HRESULT image_loading([out, retval] VARIANT_BOOL* pVal);
		[propput, id(29)] HRESULT image_loading([in] VARIANT_BOOL newVal);
		[propget, id(30)] HRESULT image_shrink_standalone_to_fit([out, retval] VARIANT_BOOL* pVal);
		[propput, id(30)] HRESULT image_shrink_standalone_to_fit([in] VARIANT_BOOL newVal);
		[propget, id(31)] HRESULT javascript([out, retval] VARIANT_BOOL* pVal);
		[propput, id(31)] HRESULT javascript([in] VARIANT_BOOL newVal);
		[propget, id(32)] HRESULT javascript_access_clipboard([out, retval] VARIANT_BOOL* pVal);
		[propput, id(32)] HRESULT javascript_access_clipboard([in] VARIANT_BOOL newVal);
		[propget, id(33)] HRESULT local_storage([out, retval] VARIANT_BOOL* pVal);
		[propput, id(33)] HRESULT local_storage([in] VARIANT_BOOL newVal);
		[propget, id(34)] HRESULT minimum_font_size([out, retval] LONG* pVal);
		[propput, id(34)] HRESULT minimum_font_size([in] LONG newVal);
		[propget, id(35)] HRESULT minimum_logical_font_size([out, retval] LONG* pVal);
		[propput, id(35)] HRESULT minimum_logical_font_size([in] LONG newVal);
		[propget, id(36)] HRESULT plugins([out, retval] VARIANT_BOOL* pVal);
		[propput, id(36)] HRESULT plugins([in] VARIANT_BOOL newVal);
		[propget, id(37)] HRESULT remote_fonts([out, retval] VARIANT_BOOL* pVal);
		[propput, id(37)] HRESULT remote_fonts([in] VARIANT_BOOL newVal);
		[propget, id(38)] HRESULT sans_serif_font_family([out, retval] BSTR* pVal);
		[propput, id(38)] HRESULT sans_serif_font_family([in] BSTR newVal);
		[propget, id(39)] HRESULT serif_font_family([out, retval] BSTR* pVal);
		[propput, id(39)] HRESULT serif_font_family([in] BSTR newVal);
		[propget, id(40)] HRESULT standard_font_family([out, retval] BSTR* pVal);
		[propput, id(40)] HRESULT standard_font_family([in] BSTR newVal);
		[propget, id(41)] HRESULT tab_to_links([out, retval] VARIANT_BOOL* pVal);
		[propput, id(41)] HRESULT tab_to_links([in] VARIANT_BOOL newVal);
		[propget, id(42)] HRESULT text_area_resize([out, retval] VARIANT_BOOL* pVal);
		[propput, id(42)] HRESULT text_area_resize([in] VARIANT_BOOL newVal);
		[propget, id(43)] HRESULT universal_access_from_file_urls([out, retval] VARIANT_BOOL* pVal);
		[propput, id(43)] HRESULT universal_access_from_file_urls([in] VARIANT_BOOL newVal);
		[propget, id(44)] HRESULT web_security([out, retval] VARIANT_BOOL* pVal);
		[propput, id(44)] HRESULT web_security([in] VARIANT_BOOL newVal);
		[propget, id(45)] HRESULT webgl([out, retval] VARIANT_BOOL* pVal);
		[propput, id(45)] HRESULT webgl([in] VARIANT_BOOL newVal);
		[propget, id(46)] HRESULT javascript_close_windows([out, retval] VARIANT_BOOL* pVal);
		[propput, id(46)] HRESULT javascript_close_windows([in] VARIANT_BOOL newVal);
		[propget, id(47)] HRESULT javascript_dom_paste([out, retval] VARIANT_BOOL* pVal);
		[propput, id(47)] HRESULT javascript_dom_paste([in] VARIANT_BOOL newVal);
		[propget, id(48)] HRESULT flash_player_dll_path([out, retval] BSTR* pVal);
		[propput, id(48)] HRESULT flash_player_dll_path([in] BSTR newVal);

		[id(255)] HRESULT toString([out, retval] BSTR* str);

	dispinterface _DWebKitXCEF3

			// IPC

			// HTML5 Editing
			[id(9)] VARIANT_BOOL Modified;

			// DOM Events

			[id(15)] DOM_EVENTS Events;
			[id(107)] VARIANT_BOOL FireOnEventForAllEvents;

			// Navigation
			[id(80)] VARIANT_BOOL BrowserReady; 
			[id(10)] BSTR HTML;
			[id(64)] BSTR URL;
			[id(77)] BSTR BaseURL;
			[id(76)] BSTR CurrentURL;

			[id(16)] OLE_HANDLE hWnd;
			[id(17)] OLE_HANDLE hWndBrowser;

			// HTML5 Editing - Selection
			[id(20)] BSTR ActiveElement;			
			[id(25)] BSTR SelAnchorElement;
			[id(26)] BSTR SelFocusElement;

			[id(32)] BSTR SelHTML;
			[id(33)] BSTR SelFontName;
			[id(34)] BSTR SelFontSize;
			[id(35)] BSTR SelFontColor;
			[id(36)] BSTR SelFontBackColor;			
			[id(38)] BSTR SelText;
			[id(39)] BSTR SelType;

			[id(40)] VARIANT_BOOL SelCollapsed;
			[id(49)] VARIANT_BOOL SelFontBold;
			[id(50)] VARIANT_BOOL SelFontItalic;
			[id(51)] VARIANT_BOOL SelStrikeThrough;
			[id(52)] VARIANT_BOOL SelFontUnderline;
			[id(54)] VARIANT_BOOL ExecCommandSetFocus;
			[id(55)] VARIANT_BOOL SpellChecking;

			[id(56)] VARIANT_BOOL FormatUsingInternalSelectionAPI;

			// Data-Binding (WIP)
			[id(71)] BSTR DataSource;
			[id(72)] BSTR DataMember;			
			[id(95)] BSTR DataField;

			// HTML5 Editing - Undo / Redo

			[id(96)] VARIANT_BOOL UndoEnabled;
			[id(85)] LONG UndoSize;
			[id(87)] VARIANT_BOOL CanUndo;
			[id(88)] VARIANT_BOOL CanRedo;
			[id(89)] LONG RedoSize;
			[id(90)] VARIANT_BOOL UndoObserverEnabled;

			// Download Files
			[id(91)] VARIANT_BOOL DownloadScripts;			


			// Creation / Activation

			[id(79)] void Create();
			[id(81)] void Repaint();
			[id(31)] VARIANT_BOOL Activate(BSTR YourEmail, BSTR YourActivationKey);
			[id(108)] VARIANT_BOOL ActivateTerminal(BSTR YourTerminalActivationKey);

			// Chrome Dev Tools
			[id(99)] void ShowDevTools();

			// Preferences

			[id(69)] BSTR GetPreference(BSTR Name);
			[id(70)] void SetPreference(BSTR Name, BSTR Value);

			// Navigation

			[id(1)] void Open(BSTR URL); 
			[id(92)] void NavigateBack();
			[id(93)] void NavigateForward();
			[id(94)] void StopLoading();

			// JavaScript (Editor Edition Only)

			[id(97)] void AddScript(BSTR URL);
			[id(98)] void AddCode(BSTR JavaScript);
			[id(4)] BSTR Eval(BSTR Code);			
			[id(103)] VARIANT JSCallback(BSTR FunctionName, VARIANT Arguments, VARIANT_BOOL Async);
			[id(105)] VARIANT CallByName(BSTR Name, VARIANT Arguments);

			// DOM Events
			[id(5)] void AddEventListener(BSTR Selector, BSTR Event, LONG AddressOfEventHandler, VARIANT_BOOL UseCapture, VARIANT_BOOL Async);
			[id(6)] void AddEventListenerEx(BSTR Selector, BSTR Event, IDispatch* vbObject, BSTR vbObjectFunctionName, VARIANT_BOOL UseCapture, VARIANT_BOOL Async);			
			[id(18)] void RemoveEventListener(BSTR Selector, BSTR Event, LONG AddressOfEventHandler, VARIANT_BOOL UseCapture);
			[id(19)] void RemoveEventListenerEx(BSTR Selector, BSTR Event, IDispatch* vbObject, BSTR vbObjectFunctionName, VARIANT_BOOL UseCapture);
			[id(104)] VARIANT DispatchEvent(BSTR TargetSelector, BSTR EventName, VARIANT_BOOL Bubbles, VARIANT_BOOL Cancelable, VARIANT_BOOL Composed, VARIANT Detail, VARIANT_BOOL Async);

			// DOM Access - Attributes

			[id(59)] BSTR GetAttributes(BSTR Selector);
			[id(60)] void SetAttributes(BSTR Selector, BSTR Attributes);
			[id(74)] void RemoveAttribute(BSTR Selector, BSTR AttrName);
			[id(11)] void SetAttribute(BSTR Selector, BSTR Name, BSTR Value);
			[id(13)] BSTR GetAttribute(BSTR Selector, BSTR AttrName);

			// DOM Access - CSS3 / Styles

			[id(58)] BSTR GetStyle(BSTR Selector, BSTR Setting, VARIANT_BOOL ComputedStyle);
			[id(8)] void SetStyle(BSTR Selector, BSTR Setting, BSTR Value);
			[id(14)] BSTR GetCssText(BSTR Selector, VARIANT_BOOL ComputedStyle);
			[id(57)] void SetCssText(BSTR Selector, BSTR CSSText);

			// DOM Access - HTML Markup

			[id(21)] BSTR GetInnerHTML(BSTR Selector);
			[id(22)] void SetInnerHTML(BSTR Selector, BSTR HTML);
			[id(23)] BSTR GetOuterHTML(BSTR Selector);
			[id(24)] void SetOuterHTML(BSTR Selector, BSTR HTML);

			// HTML5 Editing

			[id(2)] void Edit();
			[id(3)] void Preview();
			[id(27)] BSTR ExecCommand(EDIT_COMMANDS Command, BSTR Selector, BSTR Arguments);
			[id(28)] BSTR TidyHTML(BSTR HTML, BSTR Options);
			[id(63)] void ReplaceText(BSTR Find, BSTR Replace, VARIANT_BOOL IgnoreCase);

			// HTML5 Editing - Selection

			[id(7)] void SelectElement(BSTR Selector, VARIANT_BOOL MoveCaret, VARIANT_BOOL SelectContents);
			[id(53)] void Deselect();
			[id(42)] void SelCollapseToEnd();
			[id(43)] void SelCollapseToStart();
			[id(44)] VARIANT_BOOL SelContainsNode(BSTR Selector, VARIANT_BOOL PartialContainment);
			[id(45)] void SelDelete();
			[id(46)] void SelEmpty();
			[id(47)] void SelExtend(BSTR Selector, LONG Offset);
			[id(48)] void SelAllChildren();
			[id(75)] void SelectTableColumn(BSTR TDSelector);
			[id(67)] void Delete(BSTR Selector);
			[id(66)] void SetSelection(LONG Offset, LONG Length);			
			[id(68)] void GetSelection(BSTR Selector, LONG* Offset, LONG* Length);

			// HTML5 Editing - Undo / Redo

			[id(83)] LONG Undo();
			[id(84)] void ClearUndo();
			[id(86)] LONG Redo();
			[id(82)] LONG Commit();

			// Download Files

			[id(101)] void CancelDownload(LONG ID);
			[id(102)] void Download(BSTR URL);			

			// Printing / Saving

			[id(65)] void Print();
			[id(78)] void SaveHTML(BSTR FileName);
			[id(109)] void SavePDF(BSTR FileName, VARIANT_BOOL Landscape);

			// Data-Binding (WIP)

			[id(73)] void DataBind(BSTR Selector);			

	//  Event dispatch interface for CWebKitXCEF3Ctrl

	dispinterface _DWebKitXCEF3Events
			//  Event interface has no properties

			[id(1)] void OnBrowserReady();
			[id(2)] void OnLoadStart();
			[id(3)] void OnLoadEnd();
			[id(4)] void OnLoadError(LONG ErrorCode, BSTR ErrorMessage, BSTR FailedURL);
			[id(5)] void OnLoadingStateChange(VARIANT_BOOL IsLoading, VARIANT_BOOL CanGoBack, VARIANT_BOOL CanGoForward);
			[id(6)] void OnAddressChange(BSTR URL);
			[id(7)] void OnTitleChange(BSTR Title);
			[id(8)] void OnStatusChange(BSTR StatusText);
			[id(9)] void OnConsoleMessage(BSTR ConsoleMessage, BSTR Source, LONG Line);			
			[id(10)] void OnTooltip(BSTR Tip);
			[id(11)] void OnFullscreenModeChange(BSTR Mode);			
			[id(13)] void OnDeselect();						
			[id(15)] void OnUndo(BSTR HTML);
			[id(16)] void OnRedo(BSTR HTML);						
			[id(17)] void OnUndoSave();
			[id(18)] void OnScriptResourceCancelled(BSTR URL);
			[id(19)] void OnContextMenu();			
			[id(20)] void OnComPostMessage(VARIANT* Params);						
			[id(21)] void OnCreate(ISettings* Settings, BSTR* CommandLineSwitches);
			[id(22)] void OnIPCTimeOut();
			[id(23)] void OnBeforeDownload(LONG ID, BSTR URL, BSTR OriginalUrl, BSTR MimeType, BSTR* FullPath, BSTR* SuggestedFileName, LONG TotalBytes, LONG ReceivedBytes, LONG PercentComplete, LONG CurrentSpeed, VARIANT_BOOL* Cancel);
			[id(24)] void OnDownloadUpdated(LONG ID, BSTR URL, BSTR OriginalUrl, BSTR MimeType, BSTR FullPath, BSTR SuggestedFileName, LONG TotalBytes, LONG ReceivedBytes, LONG PercentComplete, LONG CurrentSpeed, VARIANT_BOOL* Cancel);			
			[id(25)] void OnBeforeNavigate(LONG ID, LONG BrowserID, LONG FrameID, BSTR FrameName, VARIANT_BOOL IsRedirect, NAV_RESOURCE_TYPE ResourceType, NAV_TRANSITION_TYPE TransitionType, BSTR Method, BSTR ReferrerURL, BSTR CurrentURL, BSTR* NewURL, VARIANT_BOOL* Cancel);			
			[id(12)] void OnEvent(BSTR EventType, BSTR EventSelector, BSTR TargetSelector, BSTR TargetPath, BSTR EventData, VARIANT_BOOL Async, VARIANT_BOOL* PreventDefault, VARIANT_BOOL* CancelBubble);

	//  Class information for CWebKitXCEF3Ctrl
	coclass WebKitXCEF3
		[default] dispinterface _DWebKitXCEF3;
		[default, source] dispinterface _DWebKitXCEF3Events;

	coclass Settings
		[default] interface ISettings;

WebKitX SamplesWebKitX HTML5 Editor (VB6)

This is a simple, yet complete, sample of WebKitX CEF3 ActiveX control. The sample is shipped both as Visual Basic 6 source code project, as well as a complete binary bundle that includes CodeMax Editor ActiveX and CEF3 binaries. The sample demonstrates all WebKitX advanced features including FrontPage-like selection synchronization between HTML5 Designer and Source Editor, Table Editing, Selector API, and advanced CSS3 styling. The binary bundle can be used as a royalties-free stand-alone HTML5 Editor.

Simple Browser (VB6)

This sample demonstrates the WebKitX Browser Edition (no editing possible). You can embed WebKitX in your applications with just 3 lines of code!


On December 2014 mobileFX open sourced on GitHub WebKitX based on CEF1: Chromium Embedded Framework (CEF1) ActiveX Wrapper (Dec 2014). Since then we received tons of requests (and bounties) from Visual Basic 6 programmers for a CEF3 version of our ActiveX. Since CEF1 and CEF3 have completely different architectures, we decided to write the new ActiveX from scratch. At the same time we wanted CEF3 WebKitX to be suitable for commercial products and HTML5 Editors (such as Coconut2D) and designed several innovative features for it. 

On December 2017 we decided to finally implement the CEF3 version of WebKitX as an affordable commercial solution, with proper support. WebKitX for CEF3 has quite some unique innovations on it, such as the back-to-back COM-to-IPC bus implementation, care for multithreading and our own HTML5 editing and selection engine that we will keep evolving.

Other mobileFX Products

CairoCanvasX is an HTML5 Canvas 2D Rendering Context for use with OLE/COM languages that does not require HTML5 run-time. The ActiveX is linked with Cairo 2D Graphics Library version 1.10.2 from GTK+ 2.24 win32 implementation. This is a production-grade stable component for commercial use that will add hardware accelerated vector graphics in your desktop applications and 2D games. Effort has been made to preserve HTML5 canvas API in order to offer smooth web to desktop porting and vice versa.

Find out more about CairoCanvasX