mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-21 17:25:36 +00:00
Read-only Git mirror of the Mercurial gecko repositories at https://hg.mozilla.org. How to contribute: https://firefox-source-docs.mozilla.org/contributing/contribution_quickref.html
b19e374949
This is a change in the Browser API itself. Before, on `mozbrowserlocationchange`, we would call `getCanGoBack()` and `getCanGoForward()`. Two asynchronous methods called on an event, which doesn't make much sense, especially because we already know on `mozbrowserlocationchange` if we can go back/forward. So here I'm adding 2 new properties to the event to tell if the iframe can go back/forward. The way `event.detail` is defined also changed. Before, `event.detail` was a string (the new uri), now it's an object (`{uri:String,canGoBack:bool,canGoForward:bool}`). This is one of the design flaw of the early Browser API: not using objects for the detail property, making it hard to extend the event payload. So that makes this event not backward compatible. We can: 1. just don't care. It's up to the client to test if event.detail is a string or not if it needs to be compatible with Gecko 2. fix it in Gecko. The client will still have to test `event.detail` to make it compatible with older version of gecko 3. rename `mozbrowserlocationchange` to something else (`mozbrowserlocationchange2` ?) Please advise. Source-Repo: https://github.com/servo/servo Source-Revision: db63aa423fcfc87e47d9250680737ef11d2c3d26 |
||
---|---|---|
servo |