1
0
mirror of https://github.com/salvadordf/CEF4Delphi.git synced 2025-06-12 22:07:39 +02:00

Update to CEF 133.4.6

This commit is contained in:
Salvador Díaz Fau
2025-02-16 15:02:10 +01:00
parent 2081ad570a
commit e2bafbdf9a
247 changed files with 11842 additions and 7710 deletions

View File

@ -688,13 +688,68 @@ Converts PCefString to ustring.</p>
</tr>
<tr><td colspan="1">
<p>
Register a new V8 extension with the specified JavaScript extension code and handler. Functions implemented by the handler are prototyped using the keyword 'native'. The calling of a native function is restricted to the scope in which the prototype of the native function is defined. This function may only be called on the render process main thread.
<p>Example JavaScript extension code: &lt;pre&gt; // create the 'example' global object if it doesn't already exist. if (!example) example = {}; // create the 'example.test' global object if it doesn't already exist. if (!example.test) example.test = {}; (function() { // Define the function 'example.test.myfunction'. example.test.myfunction = function() { // Call CefV8Handler::Execute() with the function name 'MyFunction' // and no arguments. native function MyFunction(); return MyFunction(); }; // Define the getter function for parameter 'example.test.myparam'. example.test.__defineGetter__('myparam', function() { // Call CefV8Handler::Execute() with the function name 'GetMyParam' // and no arguments. native function GetMyParam(); return GetMyParam(); }); // Define the setter function for parameter 'example.test.myparam'. example.test.__defineSetter__('myparam', function(b) { // Call CefV8Handler::Execute() with the function name 'SetMyParam' // and a single argument. native function SetMyParam(); if(b) SetMyParam(b); });
<p>// Extension definitions can also contain normal JavaScript variables // and functions. var myint = 0; example.test.increment = function() { myint += 1; return myint; }; })(); &lt;/pre&gt;
<p>Register a new V8 extension with the specified JavaScript extension code and handler. Functions implemented by the handler are prototyped using the keyword 'native'. The calling of a native function is restricted to the scope in which the prototype of the native function is defined. This function may only be called on the render process main thread.
<p>Example usage in the page: &lt;pre&gt; // Call the function. example.test.myfunction(); // Set the parameter. example.test.myparam = value; // Get the parameter. value = example.test.myparam; // Call another function. example.test.increment(); &lt;/pre&gt; </p>
<p>Example JavaScript extension code: </p>
<pre class="preformatted">
// create the 'example' global object if it doesn't already exist.
if (!example)
example = {};
// create the 'example.test' global object if it doesn't already exist.
if (!example.test)
example.test = {};
(function() {
// Define the function 'example.test.myfunction'.
example.test.myfunction = function() {
// Call CefV8Handler::Execute() with the function name 'MyFunction'
// and no arguments.
native function MyFunction();
return MyFunction();
};
// Define the getter function for parameter 'example.test.myparam'.
example.test.__defineGetter__('myparam', function() {
// Call CefV8Handler::Execute() with the function name 'GetMyParam'
// and no arguments.
native function GetMyParam();
return GetMyParam();
});
// Define the setter function for parameter 'example.test.myparam'.
example.test.__defineSetter__('myparam', function(b) {
// Call CefV8Handler::Execute() with the function name 'SetMyParam'
// and a single argument.
native function SetMyParam();
if(b) SetMyParam(b);
});
// Extension definitions can also contain normal JavaScript variables
// and functions.
var myint = 0;
example.test.increment = function() {
myint += 1;
return myint;
};
})();</pre>
<p>
<p>Example usage in the page: </p>
<pre class="preformatted">
// Call the function.
example.test.myfunction();
// Set the parameter.
example.test.myparam = value;
// Get the parameter.
value = example.test.myparam;
// Call another function.
example.test.increment();</pre>
<p>
<p></p>
</td></tr>
</table>
<table class="detail wide_list">