r59962 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r59961‎ | r59962 | r59963 >
Date:18:58, 11 December 2009
Author:catrope
Status:ok
Tags:
Comment:
UsabilityInitiative: Clarify comments for getContents(), setContents()
Modified paths:
  • /trunk/extensions/UsabilityInitiative/js/plugins/jquery.wikiEditor.js (modified) (history)

Diff [purge]

Index: trunk/extensions/UsabilityInitiative/js/plugins/jquery.wikiEditor.js
@@ -365,7 +365,7 @@
366366 return context.$content != undefined && context.$content[0].innerHTML != undefined;
367367 },
368368 /**
369 - * Gets the complete contents of the iframe
 369+ * Gets the complete contents of the iframe (text, not HTML)
370370 */
371371 'getContents': function() {
372372 // FIXME: Evil ua-sniffing action!
@@ -376,6 +376,9 @@
377377 // Setting the HTML of the textarea doesn't work on all browsers, use a dummy <div> instead
378378 return $( '<div />' ).html( context.$content.html().replace( /\<br\>/g, "\n" ) ).text();
379379 },
 380+ /**
 381+ * Sets the complete contents of the iframe (text, not HTML; HTML passed will be converted to entities)
 382+ */
380383 'setContents': function( options ) {
381384 context.$content.text( options.contents );
382385 return context.$textarea;

Status & tagging log