mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-01 14:45:29 +00:00
26 lines
682 B
HTML
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> |