webview icon indicating copy to clipboard operation
webview copied to clipboard

Javascript error on latest ubuntu / gtk

Open marcomq opened this issue 4 years ago • 0 comments

Hi! Webview has issues with the latest gtk version. There is an error message aboit an undefined "invoke" funktion.

This error showed up when enabling the debug console:

[Error] Unhandled Promise Rejection: TypeError: undefined is not an object (evaluating 'window.external.invoke')
	dispatchException (nimview.iife.js:1:27644)
	(anonymous function) (nimview.iife.js:1:23878)
	t (nimview.iife.js:1)
	s (nimview.iife.js:1:321)
	promiseReactionJob

[Error] TypeError: window.backend.echoAndModify is not a function. (In 'window.backend.echoAndModify(document.getElementById('sampleInput').value)', 'window.backend.echoAndModify' is undefined)
	onclick (index.html:13)

I created a PR to fix the issue. It is updating to a maintained C webview of the library wails and adding a workaround for gtk:

https://github.com/oskca/webview/pull/19

marcomq avatar Sep 29 '21 04:09 marcomq