goog.dom.AbstractSavedCaretRange
Provided By | |
---|---|
Extends | |
All Implemented Interfaces | |
All Known Direct Subclasses |
Abstract interface for a range saved using carets.
new AbstractSavedCaretRange()
Parameters | None. |
---|
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'); };
this.getCaret( start ) → (Element|null)
(Element|null)
Gets carets.
Parameters |
| ||||
---|---|---|---|---|---|
Returns |
|
this.getDisposed() → boolean
boolean
warning Deprecated | Use |
---|
Defined by | |||
---|---|---|---|
Parameters | None. | ||
Returns |
|
this.isDisposed() → boolean
boolean
Overrides | |||
---|---|---|---|
Specified by | |||
Parameters | None. | ||
Returns |
|
this.registerDisposable( disposable ) → void
void
Associates a disposable object with this object so that they will be disposed together.
Defined by | |||||
---|---|---|---|---|---|
Parameters |
|
this.removeCarets( opt_range ) → (goog.dom.AbstractRange|null|undefined)
(goog.dom.AbstractRange|null|undefined)
Removes the carets from the current restoration document.
Parameters |
| ||||
---|---|---|---|---|---|
Returns |
|
this.restore( opt_stayAlive ) → (goog.dom.AbstractRange|null)
(goog.dom.AbstractRange|null)
Restores the range and by default disposes of the saved copy. Take note: this means the by default SavedRange objects are single use objects.
Defined by | |||||
---|---|---|---|---|---|
Parameters |
| ||||
Returns |
|
this.restoreInternal() → (goog.dom.AbstractRange|null)
(goog.dom.AbstractRange|null)
Internal method to restore the saved range.
Defined by | |||
---|---|---|---|
Parameters | None. | ||
Returns |
|
this.setRestorationDocument( doc ) → void
void
Sets the document where the range will be restored.
Parameters |
|
---|
this.toAbstractRange() → (goog.dom.AbstractRange|null)
(goog.dom.AbstractRange|null)
Gets the range that this SavedCaretRage represents, without selecting it or removing the carets from the DOM.
Parameters | None. | ||
---|---|---|---|
Returns |
|
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.