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

Add a method to Servo to clean the history #19284

Open
paulrouget opened this issue Nov 19, 2017 · 6 comments
Open

Add a method to Servo to clean the history #19284

paulrouget opened this issue Nov 19, 2017 · 6 comments

Comments

@paulrouget
Copy link
Contributor

A PurgeHistory(BrowserId) event.

This would clear the history.

On completion, we would get a HistoryChanged event.

/cc @asajeffrey what would it take to implement that?

@cbrewster
Copy link
Contributor

By purging do you mean removing all history entries in the past and future?

@paulrouget
Copy link
Contributor Author

Yes.

@asajeffrey
Copy link
Member

It probably wouldn't be too tricky to implement, but we'd need a compelling argument for why we should have some non-standard behaviour. @paulrouget what's a use-case?

@paulrouget
Copy link
Contributor Author

what's a use-case?

That's a feature found in some browsers. A menu to clear history. It's also a method found in Webkit and Gecko.

In Firefox, clearing history make it so we can't go back or forward anymore, but the current document is conserved.

@asajeffrey
Copy link
Member

Fair enough. Is any of this spec'd somewhere? Is the HistoryChanged event? It looks like PopState is the one specified in https://html.spec.whatwg.org/multipage/browsing-the-web.html#history-traversal:popstateevent, though that's not a great name.

@paulrouget
Copy link
Contributor Author

I don't think there is any spec. The HistoryChanged event is already here and will like be fired automatically. To be clear, I am not talking about the browserapi. We just need another WindowEvent.

@asajeffrey this is not urgent, and once I need it, I will implement it myself. I just wanted to know if there was any difficulties in implementing this beside finding all the non active pipelines and destroying them.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants