Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

begin event loop and EngineInstance #733

Merged
merged 1 commit into from
Dec 28, 2024

Conversation

Sharktheone
Copy link
Member

No description provided.

@Sharktheone Sharktheone added useragent everything related to useragent implementations event loop labels Dec 24, 2024
@Sharktheone Sharktheone self-assigned this Dec 24, 2024
use tokio::task::{spawn_blocking, LocalSet};
use url::Url;

pub struct EngineInstance<C: ModuleConfiguration> {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't know exactly what an engine instance is... but from context I don't understand why it needs a title or url?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is basically a tab. It will manage the event loop, the web event loop and everything else.

It needs the title and url, so JS can ask for it

use crate::chrome::ChromeHandle;
use crate::config::HasRenderBackend;

pub trait HasChrome: HasRenderBackend + Sized {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please describe what chrome is and what it does...

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, I still need many comments. I am also not completely happy about the HasChrome thingy.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Me neither, but more about the connotation with the chrome browser. I'm not 100% sure what it is for, but we could see if we can find a better naming for it.. for now, don't worry about it too much,.. we can always rename things when we find better names or ways... (like gosub_interface)

@Sharktheone Sharktheone marked this pull request as ready for review December 26, 2024 21:13
@Sharktheone Sharktheone requested a review from jaytaph December 27, 2024 13:41
@Sharktheone Sharktheone force-pushed the event-loop/initial branch 2 times, most recently from a5c91b3 to ddfcd8c Compare December 28, 2024 02:01
@Sharktheone Sharktheone merged commit 35b9956 into gosub-io:main Dec 28, 2024
10 checks passed
@Sharktheone Sharktheone deleted the event-loop/initial branch December 28, 2024 14:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
event loop useragent everything related to useragent implementations
Projects
Status: 🎯 Done
Development

Successfully merging this pull request may close these issues.

2 participants