Changeset 771 for trunk/modules


Ignore:
Timestamp:
03/12/07 23:03:08 (12 years ago)
Author:
ray
Message:

Ticket #981 No doctype in iframe content document/ editor always in quirks mode

Location:
trunk/modules
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/modules/Gecko/Gecko.js

    r754 r771  
    739739   
    740740  return result; 
    741 } 
     741}; 
     742 
     743/** Return the doctype of a document, if set 
     744 *  
     745 * @param doc DOM element document 
     746 * @returns string the actual doctype 
     747 */ 
     748Xinha.getDoctype = function (doc) 
     749{ 
     750  var d = ''; 
     751  if (doc.doctype) 
     752  { 
     753    d += '<!DOCTYPE ' + doc.doctype.name + " PUBLIC "; 
     754    d +=  doc.doctype.publicId ? '"' + doc.doctype.publicId + '"' : '';   
     755    d +=  doc.doctype.systemId ? ' "'+ doc.doctype.systemId + '"' : '';  
     756    d += ">"; 
     757  } 
     758  return d; 
     759}; 
  • trunk/modules/InternetExplorer/InternetExplorer.js

    r737 r771  
    458458  if ( target == 'textarea' ) this._textArea.focus(); 
    459459}; 
     460 
     461/** Return a doctype or empty string depending on whether the document is in Qirksmode or Standards Compliant Mode 
     462 *  It's hardly possible to detect the actual doctype without unreasonable effort, so we set HTML 4.01 just to trigger the rendering mode 
     463 *  
     464 * @param doc DOM element document 
     465 * @returns string doctype || empty 
     466 */ 
     467Xinha.getDoctype = function (doc) 
     468{ 
     469  return (doc.compatMode == "CSS1Compat") ? '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">' : ''; 
     470}; 
Note: See TracChangeset for help on using the changeset viewer.