mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-11-10 19:00:08 +00:00
[broadway] Make the toplevel mode a url parameter
This commit is contained in:
parent
fe79bbd618
commit
d6beabbff2
@ -1078,6 +1078,13 @@ function setupDocument(document)
|
||||
|
||||
function connect()
|
||||
{
|
||||
var url = window.location.toString();
|
||||
var query_string = url.split("?");
|
||||
if (query_string.length > 1) {
|
||||
var params = query_string[1].split("&");
|
||||
if (params[0].indexOf("toplevel") != -1)
|
||||
useToplevelWindows = true;
|
||||
}
|
||||
var xhr = createXHR();
|
||||
if (xhr) {
|
||||
if (typeof xhr.multipart == 'undefined') {
|
||||
|
@ -750,7 +750,7 @@ send_data (HttpRequest *request,
|
||||
static void
|
||||
got_request (HttpRequest *request)
|
||||
{
|
||||
char *start, *escaped, *tmp, *version;
|
||||
char *start, *escaped, *tmp, *version, *query;
|
||||
|
||||
if (!g_str_has_prefix (request->request->str, "GET "))
|
||||
{
|
||||
@ -777,6 +777,10 @@ got_request (HttpRequest *request)
|
||||
version = g_strndup (start, tmp - start);
|
||||
}
|
||||
|
||||
query = strchr (escaped, '?');
|
||||
if (query)
|
||||
*query = 0;
|
||||
|
||||
if (strcmp (escaped, "/client.html") == 0 || strcmp (escaped, "/") == 0)
|
||||
send_data (request, "text/html", client_html, G_N_ELEMENTS(client_html) - 1);
|
||||
else if (strcmp (escaped, "/broadway.js") == 0)
|
||||
|
Loading…
Reference in New Issue
Block a user