goog.editor.ClickToEditWrapper
Provided By | |
---|---|
Extends | |
All Implemented Interfaces |
Initialize the wrapper, and begin listening to mouse events immediately.
new ClickToEditWrapper( fieldObj )
Parameters |
|
---|
Instance Methods
this.addOnDisposeCallback<T>( callback, opt_scope ) → void
void
Invokes a callback function when this object is disposed. Callbacks are invoked in the order in which they were added. If a callback is added to an already disposed Disposable, it will be called immediately.
Defined by | |||||||||
---|---|---|---|---|---|---|---|---|---|
Parameters |
|
this.dispose() → ?
?
Disposes of the object and its resources.
Overrides | ||
---|---|---|
Specified by | ||
Parameters | None. | |
Returns |
|
this.disposeInternal() → void
void
Performs appropriate cleanup. See description of goog.disposable.IDisposable
for examples. Classes that extend goog.Disposable
should override this
method. Not reentrant. To avoid calling it twice, it must only be called from
the subclass' disposeInternal
method. Everywhere else the public dispose
method must be used. For example:
mypackage.MyClass = function() { mypackage.MyClass.base(this, 'constructor'); // Constructor logic specific to MyClass. ... }; goog.inherits(mypackage.MyClass, goog.Disposable); mypackage.MyClass.prototype.disposeInternal = function() { // Dispose logic specific to MyClass. ... // Call superclass's disposeInternal at the end of the subclass's, like // in C++, to avoid hard-to-catch issues. mypackage.MyClass.base(this, 'disposeInternal'); };
Overrides | |
---|---|
Parameters | None. |
this.enterDocument() → void
void
Initialize listeners when the uneditable field is added to the document. Also sets up lorem ipsum text.
this.exitDocument() → void
void
Destroy listeners when the field is removed from the document.
this.focusOnFieldObj( field ) → void
void
this.getDisposed() → boolean
boolean
warning Deprecated | Use |
---|
Defined by | |||
---|---|---|---|
Parameters | None. | ||
Returns |
|
this.getElement() → (Element|null)
(Element|null)
Returns the uneditable field element if the field is not yet editable (equivalent to EditableField.getOriginalElement()), and the editable DOM element if the field is currently editable (equivalent to EditableField.getElement()).
Parameters | None. | ||
---|---|---|---|
Returns |
|
this.getFieldObject() → (goog.editor.Field|null)
(goog.editor.Field|null)
Parameters | None. | ||
---|---|---|---|
Returns |
|
this.getOriginalDomHelper() → (goog.dom.DomHelper|null)
(goog.dom.DomHelper|null)
Parameters | None. | ||
---|---|---|---|
Returns |
|
this.isDisposed() → boolean
boolean
Overrides | |||
---|---|---|---|
Specified by | |||
Parameters | None. | ||
Returns |
|
this.makeFieldEditable( field ) → void
void
Make the field object editable.
Parameters |
|
---|
this.registerDisposable( disposable ) → void
void
Associates a disposable object with this object so that they will be disposed together.
Defined by | |||||
---|---|---|---|---|---|
Parameters |
|
Instance Properties
this.creationStack → (string|undefined)
(string|undefined)
If monitoring the goog.Disposable instances is enabled, stores the creation stack trace of the Disposable instance.