Chaos in a Can

Opera 12.00, you are awesome.

, ,

There was an Opera 12.00 snapshot a while back with an updated tabs and windows API. Unfortunately, half of it was broken. Now, in the latest snapshot, it's not!

There isn't any documentation available to my knowledge, but here are a few of the things I've figured out.
  • Tabs now have unique IDs, which will make identifying them much easier.
  • Tab groups are now visible to extensions! If you have a reference to a tab, you can also get a reference to the tab group it is in (if any).
  • Opera internal pages are now exposed to extensions. In other words, opera.extension.tabs.getFocused() actually returns something when you have speed dial focused!
  • You can now get a lot more info about a tab. For instance, you can tell whether it is closed, locked, focused, private, and which position it is in the tab bar.
  • Tabs now have a "readyState" property. I can't find any reference to a "readystatechanged" event, but at least we can now tell when a tab is finished loading.
  • You can focus tabs/groups!

There's probably a lot more, but without documentation of any kind, I'm just trying things to see what works at the moment.

Here are a few of the fun things I'll be able to add to Tab Vault now:
  • Save tab groups
  • Open a group of saved tabs as a tab group
  • I can now tell the difference between a tab that hasn't loaded and one that has loaded but doesn't have a favicon. As a result, the importer won't have to wait ~15 seconds for every tab without a favicon.


Documentation on the new API is now available at http://dev.opera.com/articles/view/extensions-api-windows-tabs/. Also, check my comment at the bottom of that page, as there are still a couple bugs to watch out for (which are currently halting my progress on Opera 12.00-ifying Tab Vault).

How to Perform a (really) clean Reinstall of OperaWindows and Tabs API Extensions

Comments

Martin KadlecBS-Harou Sunday, April 22, 2012 9:34:42 AM

This is great! party

EugenetheUg Friday, April 27, 2012 3:37:40 AM

Can you also save tabs with all the back-forward history in them? Is it, mayhaps, possible in 11.62 as well? I do not see that feature in TabVault’s current settings, and without it is just a glorified bookmarks manager. For me, with it would be golden. bigsmile Is it possible to modify the “save tab” arguments to add the tab’s history if you do not intend to implement that feature?

Joel Spadinspadija Friday, April 27, 2012 5:26:36 AM

Nope. Unfortunately, Opera doesn't have any way to get a tab's history short of calling window.history.back(), recording the tab's URL, and repeating until that stops doing anything. Not only is that just about the janketiest (technical term) thing I can think of, it would take forever, probably not work consistently, you would lose the state of the current page, and restoring the tab history would require creating the tab, then switching it through each URL in order.

Write a comment

You must be logged in to write a comment. If you're not a registered member, please sign up.