1.10.1 • Published 2 years ago

thunder-webview v1.10.1

Weekly downloads
-
License
AGPL-3.0-only
Repository
-
Last release
2 years ago

This is a small library to normalize webview messaging with different browser engines. This is not fully tested with every browser engine at this point.

This project is part of the Thunder.WebView project which is C# library for writing a multi-platform webview in a more native manner without requiring node (aka Electron).

To use, in a hosted webview, you can either add the browser script manually:

//include script
<scripts src="/dist/thunder.webview.browser.js" />

//create request object
var request = {
    RequestId: "requestId",
    Message: {} // object to be parsed as the message handler args
};

//using callbacks
_webview.sendRequest(request, function(response)
    {
        //do something with response
    });

//or using async/await
var response = await _webview.sendRequestAsync(request)

If you don't want the global scope _webview (e.g. want to reference the module), you can reference WebViewMessenger directly instead:

//import 
import {WebViewMessenger} from "thunder-webview/lib/webViewMessenger"

var messenger = new WebViewMessenger();

//using callbacks
messenger.sendRequest(request, function(response)
{
    //do something with response
});

//or using async/await
var response = await messenger.sendRequestAsync(request)
1.10.1

2 years ago

1.10.0

2 years ago

1.9.8

2 years ago

1.9.7

2 years ago

1.9.6

2 years ago

1.9.5

2 years ago

1.9.4

2 years ago

1.9.3

2 years ago

1.9.2

2 years ago

1.9.0

2 years ago

1.0.3

2 years ago

1.0.2

2 years ago

1.0.1

2 years ago

1.0.0

2 years ago