ID:1900900
 
Code:
client

Topic(href,data[])

switch(data["command"])

if("close")
var/r=text2num(data["r"])
src._myName = r


And here is the link.

<a href=\"byond://?src=\ref[src];command=close&r=222\">Click here.</a>


Problem description:
I am outputting that link into a byond_browser class, and using strictly the webclient. When clicked, the url pops into a new tab in chrome. The URL of the new tab looks on point.

byond://?src=[0x3000000];command=close&r=222


You can test here; http://www.byond.com/play/embed/174.54.26.57:2001

Anybody have a workaround for this?

The JavaScript shim in the webclient should already be taking care of any byond:// URLs that exist when the page loads. URLs added dynamically at runtime, not quite so much. (Basically, there's no 100% foolproof method for the webclient to handle all cases, so it's best to stick with basics whenever possible.)

Specifically, if you open web/browser.dms in the installation you'll see the parseLinks() function in the browser code. That should be handling all the links on the page as soon as it finishes loading.

If this is a URL that was sent in output() or browse(), then it's possible something is wrong. If you can boil it down to a test case that's be good. I know byond:// links have been tested in quite a few scenarios so the only one I can think of that could go wrong would be a dynamically created link.