Closed sastradhar closed 1 year ago
This is an unintended side effect on the new GTK JS bridge in 4.0, ie with a local web server. The old way (passing data via window.title) was buggy and inherently broken, so it had to be replaced. I don't know if anything can be done about this, other than to think of another way to make dialog between JS and Python possible.
@sastradhar I found a native way for JS bridge. The code is in the master, check it out.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
The message to post on the issue when closing it. If none provided, will not comment when closing an issue.
When pywebview.api.function is called in javascript and the server is not localhost we get Not allowed to request resource error in the js debug console. For local host the code works well. I recently update pywebview to the 4.2.2 version and this error started appearing. My code used to work in the old 3.x release. In my case the when I click on the error I am directed to this code.
function anonymous(studypath, studyid, username, band, canreport, IsAnon) { var id = (Math.random() + '').substring(2); var promise = new Promise(function(resolve, reject) { window.pywebview._checkValue('clickedonstudy', resolve, reject, __id); }); window.pywebview._bridge.call('clickedonstudy', arguments, id); return promise; }