Beispiel #1
0
 var JSDocument = function JSDocument(doc, editor) {
     this.doc = doc;
     this.editor = editor;
     this.script = ScriptAgent.scriptForURL(this.doc.url);
     this.onHighlight = this.onHighlight.bind(this);
     this.onChange = this.onChange.bind(this);
     this.onCursorActivity = this.onCursorActivity.bind(this);
     Inspector.on("HighlightAgent.highlight", this.onHighlight);
     $(this.editor).on("change", this.onChange);
     $(this.editor).on("cursorActivity", this.onCursorActivity);
     this.onCursorActivity();
 };
Beispiel #2
0
 JSDocument.prototype.script = function script() {
     return ScriptAgent.scriptForURL(this.doc.url);
 };