CEF browser - how to allow cross origin requests using the file:// protocol?
As you might know the new CEF browser doesn't support access to local files (file://) using XMLHttpRequest. Of course, JSONP would be a solution but not in my special case. I need to display local Keynote presentations (exported to HTML). Keynote uses JSONP in case the protocol is file://. So, this works with CEF. But there is one problem: There is an annoying flicker on slide transitions. Same problem with Chrome, this is nothing special with CEF in LiveCode and this does not depend on the kind of transition. Now, if you use a server and http://, Keynote uses Ajax and transitions work fine. This means I need to remove the JSONP option and tell the CEF browser somehow to allow cross origin requests using the file:// protocol. With Chrome this can be achieved by using a -–allow-file-access-from-files command line switch. Does anybody know how to set this flag for the CEF browser in LiveCode? Ralf ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: CEF browser - how to allow cross origin requests using the file:// protocol?
Now, if you use a server and http://, Keynote uses Ajax and transitions work fine. This means I need to remove the JSONP option and tell the CEF browser somehow to allow cross origin requests using the file:// protocol. With Chrome this can be achieved by using a -–allow-file-access-from-files command line switch. Does anybody know how to set this flag for the CEF browser in LiveCode? I had a very quick look at the code and I don't think it can be done without a change to the engine. One way to do it would be to implement: CefApp::OnBeforeCommandLineProcessing() In revbrowser/src/cefbrowser.cpp It could be a fixed command line argument that is added if no-one is concerned about the security implications, otherwise some new command in LiveCode that lets you add to this argument list before you create a new browser object. The second option would obviously be much more flexible. -- Mark Wilcox m...@sorcery-ltd.co.uk ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: CEF browser - how to allow cross origin requests using the file:// protocol?
Hi Mark, many thanks for your reply. The need to change the engine was what I was afraid of. This would mean, that I am at a loss as I hate to launch another application to display the presentations. Ralf On 11.07.2014, at 14:59, Mark Wilcox m...@sorcery-ltd.co.uk wrote: I had a very quick look at the code and I don't think it can be done without a change to the engine. One way to do it would be to implement: CefApp::OnBeforeCommandLineProcessing() In revbrowser/src/cefbrowser.cpp It could be a fixed command line argument that is added if no-one is concerned about the security implications, otherwise some new command in LiveCode that lets you add to this argument list before you create a new browser object. The second option would obviously be much more flexible. -- Mark Wilcox m...@sorcery-ltd.co.uk ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode