Changeset 23

Show
Ignore:
Timestamp:
06/26/08 08:31:08 (2 months ago)
Author:
simon
Message:

Practice safe DOM.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • chrome/songbee/blank-projector.html

    r1 r23  
    33    "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> 
    44<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" > 
    5     <head
     5    <head id="headElem"
    66        <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/> 
    77        <link title="myStyle" href="chrome://songbee/content/css/projector.css" type="text/css" rel="stylesheet"/> 
  • chrome/songbee/preferences.js

    r1 r23  
    5252    linkel.setAttribute("rel", "stylesheet"); 
    5353    linkel.setAttribute("href", protocolhandler.getURLSpecFromFile(file)); 
    54     // This is a bit brittle... XXX 
    55     doc.firstChild.nextSibling.firstChild.appendChild(linkel); 
     54    doc.getElementById("headElem").appendChild(linkel); 
    5655} 
    5756 
  • chrome/songbee/prefs-test.html

    r1 r23  
    33    "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> 
    44<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" > 
    5 <head
     5<head id="headElem"
    66<link rel="stylesheet" href="chrome://songbee/content/css/projector.css"/> 
    77</head>