Changeset 192


Ignore:
Timestamp:
03/17/07 09:49:09 (5 years ago)
Author:
jf.hovinne
Message:

Simplified code by replacing doc by this._doc

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/v.mische/test/002/wymeditor/jquery.wymeditor.explorer.js

    r191 r192  
    1 /* 
     1/* 
    22 * WYMeditor : what you see is What You Mean web-based editor 
    33 * Copyright (C) 2007 H.O.net - http://www.honet.be/ 
     
    3838 
    3939 
    40     var doc = iframe.contentWindow.document; 
     40    //var doc = iframe.contentWindow.document; 
    4141    this.html(this._wym._html); 
    4242 
     
    4444    //handle events 
    4545    var wymexp = this; 
    46     doc.onbeforedeactivate = function() {wymexp.saveCaret();}; 
    47     doc.onkeyup = function() {wymexp.saveCaret();}; 
    48     doc.onclick = function() {wymexp.saveCaret();}; 
     46    this._doc.onbeforedeactivate = function() {wymexp.saveCaret();}; 
     47    this._doc.onkeyup = function() {wymexp.saveCaret();}; 
     48    this._doc.onclick = function() {wymexp.saveCaret();}; 
    4949     
    5050    //callback can't be executed twice, so we check 
     
    5353}; 
    5454 
     55/* 
    5556WymClassExplorer.prototype.doc = function() { 
    5657    //MSIE needs this weird function, or sometimes you get "Permission denied" if you call this._doc 
     
    5859    return(doc); 
    5960}; 
     61*/ 
    6062 
    6163WymClassExplorer.prototype._exec = function(cmd,param) { 
     
    7577WymClassExplorer.prototype.saveCaret = function () { 
    7678 
    77     var doc = this._iframe.contentWindow.document; 
    78     doc.caretPos = doc.selection.createRange(); 
     79    //var doc = this._iframe.contentWindow.document; 
     80    this._doc.caretPos = this._doc.selection.createRange(); 
    7981}; 
    8082 
Note: See TracChangeset for help on using the changeset viewer.