Open Optic-the-Wolf opened 5 months ago
I'm not sure if these are Windows-exclusive, but on WebX, I've been experiencing the following issues:
- Adding an & (ampersand) to a tag resets its styling.
<a>
tags cannot be stylized. Additionally, I kindly request that the following could be implemented to WebX, as they will benefit everyone:
- Sandboxing Lua code! This is important!
- Support for images on Windows prebuilt binaries
- Browser tabs
- An equivalent of JavaScript's
elem.innerHTML
and doingelem.style.display = "none"
- A wait/pause/sleep function (e.g. JS's
setTimeout
)
I have two comments to make on this, firstly, Windows, did, have support for images, but it broke for some reason. And also, no wait can be done because Lua runs on the same thread as the interface, so if you make something wait, it just takes that much longer for the webpage to load.
I'm not sure if these are Windows-exclusive, but on WebX, I've been experiencing the following issues:
- Adding an & (ampersand) to a tag resets its styling.
<a>
tags cannot be stylized. Additionally, I kindly request that the following could be implemented to WebX, as they will benefit everyone:
- Sandboxing Lua code! This is important!
- Support for images on Windows prebuilt binaries
- Browser tabs
- An equivalent of JavaScript's
elem.innerHTML
and doingelem.style.display = "none"
- A wait/pause/sleep function (e.g. JS's
setTimeout
)I have two comments to make on this, firstly, Windows, did, have support for images, but it broke for some reason. And also, no wait can be done because Lua runs on the same thread as the interface, so if you make something wait, it just takes that much longer for the webpage to load.
When I was messing with stuff I actually did figure out a way to add a set_timeout it was smth like this
// func is LuaOwnedFunction
// ms is u64
glib::spawn_future_local(async move {
glib::timeout_future(core::time::Duration::from_millis(ms)).await;
if let Err(e) = func.call::<_, ()>(()) {
lualog!("error", format!("error calling function in set_timeout: {}", e));
}
});
I'm pretty sure I tested it but if it doesn't work then just have to find a different way
I'm not sure if these are Windows-exclusive, but on WebX, I've been experiencing the following issues:
- Adding an & (ampersand) to a tag resets its styling.
<a>
tags cannot be stylized. Additionally, I kindly request that the following could be implemented to WebX, as they will benefit everyone:
- Sandboxing Lua code! This is important!
- Support for images on Windows prebuilt binaries
- Browser tabs
- An equivalent of JavaScript's
elem.innerHTML
and doingelem.style.display = "none"
- A wait/pause/sleep function (e.g. JS's
setTimeout
)I have two comments to make on this, firstly, Windows, did, have support for images, but it broke for some reason. And also, no wait can be done because Lua runs on the same thread as the interface, so if you make something wait, it just takes that much longer for the webpage to load.
When I was messing with stuff I actually did figure out a way to add a set_timeout it was smth like this
// func is LuaOwnedFunction // ms is u64 glib::spawn_future_local(async move { glib::timeout_future(core::time::Duration::from_millis(ms)).await; if let Err(e) = func.call::<_, ()>(()) { lualog!("error", format!("error calling function in set_timeout: {}", e)); } });
I'm pretty sure I tested it but if it doesn't work then just have to find a different way
Yes, I've also been able to add a sleep function but since Lua and GTK run on the same thread, the program had to wait for the Lua code to run before starting altogether.
Setting the timeout via glib seems interesting though, I'll try it out
I'm not sure if these are Windows-exclusive, but on WebX, I've been experiencing the following issues:
- Adding an & (ampersand) to a tag resets its styling.
<a>
tags cannot be stylized. Additionally, I kindly request that the following could be implemented to WebX, as they will benefit everyone:
- Sandboxing Lua code! This is important!
- Support for images on Windows prebuilt binaries
- Browser tabs
- An equivalent of JavaScript's
elem.innerHTML
and doingelem.style.display = "none"
(Essential!)- A wait/pause/sleep function (e.g. JS's
setTimeout
)- Subdomains & page urls (Essential!)
Edit: I have also added style.display = "none" essentially it's elem.set_visible(bool)
I'm not sure if these are Windows-exclusive, but on WebX, I've been experiencing the following issues:
<a>
tags cannot be stylized. Additionally, I kindly request that the following could be implemented to WebX, as they will benefit everyone:
elem.innerHTML
and doingelem.style.display = "none"
(Essential!)setTimeout
)