How to detect a protocol handler from unprivileged script?

Discuss how to use and promote Web standards with the Mozilla Gecko engine.
Post Reply
dg773
Posts: 2
Joined: June 3rd, 2006, 4:27 pm

How to detect a protocol handler from unprivileged script?

Post by dg773 »

I'd like to be able to create a public web page that loads script which determines (directly or indirectly) whether a particular protocol handler is installed and available in Firefox. The goal is to open a URL to the handler if it is (invoking a local program that has been installed previously), and redirecting to a page that offers the user a chance to install the application if the handler is not detected.

The options I've found to read the registry, or otherwise determine registered protocol handlers do not appear to work from unprivileged javascript. The common technique of simply attempting to open the protocol URL from one frame, then looking at the results from script in another frame also doesn't seem work, because the error Firefox throws when a protocol handler isn't available is a user dialog that cannot be caught in script. Avoiding this dialog is the objective.

Anyone have any ideas for a strategy that would actually work?

Many thanks in advance -

David
User avatar
Daifne
Moderator
Posts: 123071
Joined: July 31st, 2005, 9:17 pm
Location: Where the Waters Meet, Wisconsin

Post by Daifne »

Moving to Web Dev.
Post Reply