KoenZomers / OneDriveAPI

API in .NET Framework 4.8.0, .NET Core 3.1 and .NET 6.0 to communicate with OneDrive Personal and OneDrive for Business
Eclipse Public License 1.0
110 stars 35 forks source link

How to Stop getting Script error #15

Closed vssaran closed 5 years ago

vssaran commented 5 years ago

Hi All, OneDriveAPI is working fine but i am getting a Script Error when i try to authorize my account. Can I know how to overcome this error.

Additional query, is it possible to download zip folder using OneDriveAPI .

jonas-s-s-s commented 5 years ago

Hello, paste webBrowser.ScriptErrorsSuppressed = true; into your MainForm_Load() sub or click on your webBrowser control and set the property "ScriptErrorsSuppressed" to true, like this: screenshot

This sovled the issue for me, the script error is still happening but the annoying error window isn't displayed. It doesn't really matter if the script error is still happening, it occured because some image failed to load which doesnt effect the page usability.

KoenZomers commented 5 years ago

Thanks @jonasxxx for your clear suggestion. I've just updated the code of the demo application to surpress the JavaScript errors. The error thrown indeed does no harm and can safely be ignored.