gecko-dev/dom/apps/tests/addons/index.html
2015-08-14 17:57:34 -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>