gecko/browser/base/content/test/general/plugin_syncRemoved.html
Benjamin Smedberg e502e17456 Bug 745187 - Don't introduce a delay notifying the frontend about new plugins added to the document, because script may immediately remove them from the page. To fix the delayed layout of XBL, introduce a separate method to calculate the notification icon visibility, r=jaws
Note: this patch still has one potential hole: if content creates a plugin and destroys it without forcing reflow, the XBL binding will not be instantiated. This doesn't appear to be a problem in practice, because every site that wants to use a plugin also has to trigger frame construction to get the plugin to instantiate (document.write of the embed element appears to do this automatically).
2013-11-02 11:53:26 -04:00

15 lines
440 B
HTML

<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<body>
<script type="text/javascript">
// create an embed, insert it in the doc and immediately remove it
var embed = document.createElement('embed');
embed.setAttribute("type", "application/x-test");
embed.setAttribute("style", "width: 0px; height: 0px;");
document.body.appendChild(embed);
window.getComputedStyle(embed, null).top;
document.body.remove(embed);
</script>