what is this strange "script" doing?
I am doing some test then find below code would pop up a window:
looks like it is trying to open an application. Can anyone tell me what is the usage/purpose of this "script"? looks like FF, Chrome, and IE all support it.
Trying to open an application? That script is just a hyperlink, it does not tell anything else in the script, just that it will open a link into site that tells "test"
scriptis being used as a protocol. No applications handle the
scriptprotocol, so clicking it does nothing useful.
You can register a custom protocol handler and if the user accepts it, your application will be allowed to open all links of that type (there are only a few permitted protocols):
window.navigator.registerProtocolHandler('web+test', 'http://example.org/?handler=%s', 'Test Protocol');
example.orgwill be allowed to run the above code, but if you open your dev tools while visiting http://example.org/ and run the above code, you will get a dialog asking you to allow or deny the protocol association. If you accept it, click the following link on any website:
It will redirect to http://example.org/?handler=hello