tenfourfox/dom/apps/tests/addons/index.html
Cameron Kaiser c9b2922b70 hello FPR
2017-04-19 00:56:45 -07:00

26 lines
682 B
HTML

<!DOCTYPE html>
<html>
<head>
<title>This page will be modified by the add-on</title>
<script>
function sendAlertsForNode(node) {
alert(node.textContent);
var color = window.getComputedStyle(node).getPropertyValue("color");
alert(color);
}
function run() {
// We need to wait for the next tick because add-ons are injected in the
// onload event too.
window.setTimeout(function() {
sendAlertsForNode(document.getElementById("header"));
sendAlertsForNode(document.getElementById("header2"));
}, 0);
}
</script>
</head>
<body onload="run()">
<h1 id="header">Lorem ipsum</h1>
<h2 id="header2">Uncustomized content</h2>
</body>
</html>