mirror of
https://github.com/gnosygnu/xowa.git
synced 2024-10-27 20:34:16 +00:00
Gui: Manually fire javascript event and exit [#836]
This commit is contained in:
parent
ff0f92b950
commit
e117823e60
@ -1,6 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
XOWA: the XOWA Offline Wiki Application
|
XOWA: the XOWA Offline Wiki Application
|
||||||
Copyright (C) 2012-2020 gnosygnu@gmail.com
|
Copyright (C) 2012-2021 gnosygnu@gmail.com
|
||||||
|
|
||||||
XOWA is licensed under the terms of the General Public License (GPL) Version 3,
|
XOWA is licensed under the terms of the General Public License (GPL) Version 3,
|
||||||
or alternatively under the terms of the Apache License Version 2.0.
|
or alternatively under the terms of the Apache License Version 2.0.
|
||||||
@ -272,6 +272,12 @@ class Swt_html_lnr_location implements LocationListener {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (String_.Has_at_bgn(location, "javascript:")) {
|
||||||
|
html_box.Html_js_eval_script(location);
|
||||||
|
arg.doit = false;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
Gfo_evt_mgr_.Pub_obj(host, evt, "v", location);
|
Gfo_evt_mgr_.Pub_obj(host, evt, "v", location);
|
||||||
arg.doit = false; // cancel navigation event, else there will be an error when trying to go to invalid location
|
arg.doit = false; // cancel navigation event, else there will be an error when trying to go to invalid location
|
||||||
|
Loading…
Reference in New Issue
Block a user