B2G/gecko/browser/devtools/styleinspector/CssRuleView.jsm
/**
 * Mark a span editable.  |editableField| will listen for the span to
 * be focused and create an InlineEditor to handle text input.
 * Changes will be committed when the InlineEditor's input is blurred
 * or dropped when the user presses escape.
 *
 * @param {object} aOptions
 *    Options for the editable field, including:
 *    {Element} element:
 *      (required) The span to be edited on focus.
 *    {function} canEdit:
 *       Will be called before creating the inplace editor.  Editor
 *       won't be created if canEdit returns false.
 *    {function} start:
 *       Will be called when the inplace editor is initialized.
 *    {function} change:
 *       Will be called when the text input changes.  Will be called
 *       with the current value of the text input.
 *    {function} done:
 *       Called when input is committed or blurred.  Called with
 *       current value and a boolean telling the caller whether to
 *       commit the change.  This function is called before the editor
 *       has been torn down.
 *    {function} destroy:
 *       Called when the editor is destroyed and has been torn down.
 *    {string} advanceChars:
 *       If any characters in advanceChars are typed, focus will advance
 *       to the next element.
 *    {boolean} stopOnReturn:
 *       If true, the return key will not advance the editor to the next
 *       focusable element.
 *    {string} trigger: The DOM event that should trigger editing,
 *      defaults to "click"
 */
Mark a span editable.  |editableField| will listen for the span to
be focused and create an InlineEditor to handle text input.
Changes will be committed when the InlineEditor's input is blurred
or dropped when the user presses escape.

@param {object} aOptions
Options for the editable field, including:
{Element} element:
(required) The span to be edited on focus.
{function} canEdit:
Will be called before creating the inplace editor.  Editor
won't be created if canEdit returns false.
{function} start:
Will be called when the inplace editor is initialized.
{function} change:
Will be called when the text input changes.  Will be called
with the current value of the text input.
{function} done:
Called when input is committed or blurred.  Called with
current value and a boolean telling the caller whether to
commit the change.  This function is called before the editor
has been torn down.
{function} destroy:
Called when the editor is destroyed and has been torn down.
{string} advanceChars:
If any characters in advanceChars are typed, focus will advance
to the next element.
{boolean} stopOnReturn:
If true, the return key will not advance the editor to the next
focusable element.
{string} trigger: The DOM event that should trigger editing,
defaults to "click"
Mark a span editable . |editableField| will listen for the span to be focused and create an InlineEditor to handle text input . Changes will be committed when the InlineEditor ' s input is blurred or dropped when the user presses escape . @param { object } aOptions Options for the editable field including : { Element } element : ( required ) The span to be edited on focus . { function } canEdit : Will be called before creating the inplace editor . Editor won ' t be created if canEdit returns false . { function } start : Will be called when the inplace editor is initialized . { function } change : Will be called when the text input changes . Will be called with the current value of the text input . { function } done : Called when input is committed or blurred . Called with current value and a boolean telling the caller whether to commit the change . This function is called before the editor has been torn down . { function } destroy : Called when the editor is destroyed and has been torn down . { string } advanceChars : If any characters in advanceChars are typed focus will advance to the next element . { boolean } stopOnReturn : If true the return key will not advance the editor to the next focusable element . { string } trigger : The DOM event that should trigger editing defaults to " click "
function editableField(aOptions)
{
  return editableItem(aOptions, function(aElement, aEvent) {
    new InplaceEditor(aOptions, aEvent);
  });
}
function editableField ( aOptions ) { return editableItem ( aOptions , function ( aElement , aEvent ) { new InplaceEditor ( aOptions , aEvent ) ; } ) ; }
Mark a span editable.
Mark a span editable .