mailto链接在Chrome扩展弹出窗口中不起作用 [英] mailto link not working in chrome extension popup

查看:545
本文介绍了mailto链接在Chrome扩展弹出窗口中不起作用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这个问题让我疯狂了2天。我做了一个简单的扩展,它调用一个返回HTML的服务器端程序,然后将其填充到弹出窗口中的div中。这一切都很好,除了包含mailto:xxx@yyy.comhref的简单锚链接。电子邮件组成窗口不会弹出。

解决方法:添加target =_ blank属性

知道为什么这是必要的。

解决方案

这可能与在浏览器中运行在不同处理器中的扩展有关,目标属性是必要的,这样就可以打开一个新的标签页/窗口......有些网站在扩展弹出窗口中显示时出于这个原因不起作用,因为扩展框架不会导航到某些页面...


This issue drove me nuts for 2 days. I made a simple chrome extension which calls a server-side program that returns HTML that I then stuff into a div in the popup. It was all fine, except for the simple anchor link containing a "mailto:xxx@yyy.com" href. An email message composition window would not pop up.

Workaround: Add target="_blank" attribute

I would like to know why this is necessary.

解决方案

It might have something to do with extensions running in separate processors from the browser, and therefore a target attribute is needed so that a new tab/window can be opened... there are some websites that don't work when displayed inside extension popups for this reason, because the extension frame won't navigate to certain pages...

这篇关于mailto链接在Chrome扩展弹出窗口中不起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆