Closed hemanth closed 9 years ago
Thanks for the PR! Another way to accomplish this would be to wrap in an <a/>
tag, like:
h('a', { href: userUrl, target: '_blank' }, h('img.avatar', { src: msg.avatar }))
@shama Tried that first, but the a
tag does not seem to open in a new window/browser even with target: '_blank'
@hemanth Ah strange, I thought that worked. Instead of using shell.openExternal
here (as that ties this element to the desktop app only), do this instead:
onclick: function (e) {
self.send('openUrl', userUrl)
}
which should emit the event up until the desktop.js
listener catches it to call shell.openExternal
: https://github.com/moose-team/friends/blob/master/desktop.js#L29
@shama Neat, thanks, makes much more sense now, have updated it to avoid direct call via shell.
Thanks!
:+1:
Had to use
shell