rdkcentral / Lightning-SDK

SDK for Lightning framework
Apache License 2.0
130 stars 69 forks source link

ENH: Allow plugins to load local json files #361

Closed ricardo-a-alves-alb closed 1 year ago

ricardo-a-alves-alb commented 1 year ago

On certain plugins, such as the Language plugin, when deployed to devices that use the file:/// protocol, if we ship our App with a local translation file, it fails on some older platforms when using the fetch API polyfill.

For example, on Tizen 3.0 that has the Chromium version 39, it uses the fetch API polyfill and fails to load the translations file causing our App to stay on a black screen. However, on Tizen 5.5 that has the Chromium version 69 and doesn't need to polyfill the fetch API, it loads with no issue.

closes #360

michielvandergeest commented 1 year ago

Thanks for this contribution @ricardo-a-alves-alb! We haven't run into this issue before with Chrome39, but possibly Tizen has a slightly different implementation.

The change you made looks good and we've tested the functionality, so we're good to merge this. We'll release this with our next quarterly release (planned for January).