feat: open_browser bool attribute
This commit is contained in:
1 parent
5233ee97d9
commit
9e04ce5342
2 files changed
+10
-4
No files matched your search
@@ -414,10 +414,15 @@ class Interpreter {
|
||||
const target = event.target;
|
||||
const real_id = target.getAttribute(`dioxus-id`);
|
||||
|
||||
rpc.call("browser_open", {
|
||||
mounted_dom_id: parseInt(real_id),
|
||||
href: target.getAttribute("browser-href"),
|
||||
})
|
||||
if (target.getAttribute("browser-open") != "false") {
|
||||
rpc.call("browser_open", {
|
||||
mounted_dom_id: parseInt(real_id),
|
||||
href: target.getAttribute("browser-href"),
|
||||
});
|
||||
} else {
|
||||
window.location = target.getAttribute("browser-href");
|
||||
}
|
||||
|
||||
})
|
||||
|
||||
} else {
|
||||
|
||||
Reference in new issue
Block a user