I have a web application that needs to show/push content to the user by opening a new tab / new window. This works in desktop browsers, at least Firefox, Chrome and Safari but seems not to open anything in the Sailfish Browser.
The client-side code is like this;
// Server pushes a PDF to client via websocket, PDF gets rendered in a new tab
if(receivable.type == "pdfUpload") {
var pdfData = atob(JSON.parse(decrypt(receivable.content, sessionPassword)));
window.open("data:application/pdf," + escape(pdfData));
}
and this
// Server pushes zipped invoices to client via websocket, prompting use to save/open
if(receivable.type == "zipUpload") {
var zipData = atob(JSON.parse(decrypt(receivable.content, sessionPassword)));
window.open("data:application/zip," + escape(zipData));
}
and this
// Server pushes helptext html to client via wabsocket, it gets rendered in a new window
if(receivable.type == "helpText") {
var helpText = atob(JSON.parse(decrypt(receivable.content, sessionPassword)));
var wnd = window.document.open("about:blank", "", "scrollbars=yes");
wnd.document.write(decodeURIComponent(escape(helpText)));
wnd.document.close();
}
It seems to me that Sailfish browser does not support content pushing to new tab/window at all.
When I start the browser from command line and try to access my application here are the results on console:
the first 2 cases (PDF upload and Zipfile upload) do not cause anything to happen, and there is no error message.
Please see the issue in https://together.jolla.com/question/146722/handling-of-javascript-windowopen-in-the-browser/
I have a web application that needs to show/push content to the user by opening a new tab / new window. This works in desktop browsers, at least Firefox, Chrome and Safari but seems not to open anything in the Sailfish Browser.
The client-side code is like this;
and this
and this
It seems to me that Sailfish browser does not support content pushing to new tab/window at all.
When I start the browser from command line and try to access my application here are the results on console:
The line 169 refers to the line "wnd.document.write(decodeURIComponent(escape(helpText)));" in the above snippet.