Comments (12)
I think the toolbox should close without prompting if it's in the sidebar or bottom of the browser.
from devtools-window.
Yeah. I don't know yet what to do for the frontend part. But for sure, we need (cancelable?) events to handle the destruction of a target.
from devtools-window.
Maybe a target should be a more complex object that can fire events. (just a thought).
from devtools-window.
Events the target should fire:
- destroy (tab closed)
- hide / show (tab switching)
- unload (before reload or tab close)
- load (once a new root document (tab.linkedBrowser.contentWindow/contentDocument) is available)
Probably more to come when we'll support remote targets.
from devtools-window.
I've suggested an updated target API here: #72 perhaps that helps with this question.
from devtools-window.
Thanks Joe, I'll try this out in our Toolbox code.
from devtools-window.
Update: this is what I think we need:
- will-close (optional and cancelable)
- close
- will-navigate (optional and cancelable)
- navigate
I don't think we need reload
and change
.
from devtools-window.
I'll take care of that.
from devtools-window.
For remote targets, close will have to fire when a tabDetached packet is received, but I don't think we can implement a cancelable will-close, since we don't have that kind of control over the remote process. The web console has a locationChanged packet that is set twice, mimicking will-navigate/navigate, but the debugger only has a single tabNavigated packet that corresponds to navigate.
We have a bug on file to use the web console's behavior with the tabNavigated packet type though. I don't believe locationChanged/tabNavigated is cancelable, either and I doubt such a protocol change would be welcome.
from devtools-window.
"Cancelability" is optional. will-close and will-navigate are optional.
from devtools-window.
Update, for tabs, I'm implementing these events:
close
will-navigate (cancelable)
navigate
hidden
visible
The mandatory events should me:
close
navigate
The target, after firing "close", should destroy itself.
from devtools-window.
fixed by PR #231
from devtools-window.
Related Issues (20)
- browser_computedview_bug_703643_context_menu_copy.js fails
- browser_webconsole_bug_597103_deactivateHUDForContext_unfocused_window.js leaks
- warning browser_webconsole_bug_595350_multiple_windows_and_tabs.js leaks
- Windows only test failures HOT 1
- Browser memory leaks HOT 3
- We should not be able to dock a toolbox if the target is Remote or Win HOT 1
- Debugger: Current tests pass but leak HOT 1
- Four debugger tests disabled pending crome debugging HOT 3
- A bunch of debugger tests are broken, at least on OSX HOT 3
- Hide connect menuitem id devtools.debugger.remote-enabled==false HOT 1
- browser_styleinspector_bug_672744_search_filter.js | Test timed out HOT 1
- browser_styleinspector_bug_672746_default_styles.js | Test timed out HOT 1
- browser_bug589375_keybindings.js times out
- styleinspector/test/browser_computedview_bug_703643_context_menu_copy.js | Timed out while polling clipboard for pasted data. HOT 1
- Use element.dispatchEvent() instead of EventUtils.synthesize(Mouse|Key)()
- Change command bar to use list-style-image rather than background-image HOT 2
- Add tooltips to the toolbar icons HOT 1
- Browser startup slowed due to initializing devtools on startup HOT 19
- Speed up inspector startup HOT 1
- Error: common.css missing in toolbox tests HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from devtools-window.