ui.IframeMask Extends goog.Disposable
Controller for an iframe mask. The mask is only valid in the current document, or else the document of the given DOM helper.

Inheritance

Constructor

goog.ui.IframeMask(opt_domHelperopt_iframePool)

Parameters

opt_domHelper : goog.dom.DomHelper=
The DOM helper for the relevant document.
opt_iframePool : goog.structs.Pool=
An optional source of iframes. Iframes will be grabbed from the pool when they're needed and returned to the pool (but still attached to the DOM) when they're done.

Instance Methods

Public Protected Private
applyMask()
Applies the iframe mask to the screen.
code »
disposeInternal()
Removes the iframe from the DOM.
code »
getIframe_() !HTMLIFrameElement
Gets the iframe to use as a mask. Creates a new one if one has not been created yet.
Returns: !HTMLIFrameElement  The iframe.
code »
hideMask()
Removes the mask from the screen.
code »
listenOnTarget(targetshowEventhideEventopt_snapElement)
Listens on the specified target, hiding and showing the iframe mask when the given event types are dispatched.
Arguments:
target : goog.events.EventTarget
The event target to listen on.
showEvent : string
When this event fires, the mask will be applied.
hideEvent : string
When this event fires, the mask will be hidden.
opt_snapElement : Element=
When the mask is applied, it will automatically snap to this element. If no element is specified, it will use the default snap element.
code »
removeHandlers()
Removes all handlers attached by listenOnTarget.
code »
setOpacity(opacity)
Sets the opacity of the mask. Will take effect the next time the mask is applied.
Arguments:
opacity : number
A value between 0 and 1, with 1 being totally opaque.
code »
setSnapElement(snapElement)
Sets the element to use as the bounds of the mask. Takes effect immediately.
Arguments:
snapElement : Element
The snap element, which the iframe will be "snapped" around.
code »
setZIndex(zIndex)
Sets the z-index of the mask. Will take effect the next time the mask is applied.
Arguments:
zIndex : number
A z-index value.
code »
addOnDisposeCallback(callbackopt_scope)
Invokes a callback function when this object is disposed. Callbacks are invoked in the order in which they were added.
Arguments:
callback : function(this:T):?
The callback function.
opt_scope : T=
An optional scope to call the callback in.
code »
dispose() void
Disposes of the object. If the object hasn't already been disposed of, calls #disposeInternal. Classes that extend goog.Disposable should override #disposeInternal in order to delete references to COM objects, DOM nodes, and other disposable objects. Reentrant.
Returns: void  Nothing.
code »
disposeInternal()
Deletes or nulls out any references to COM objects, DOM nodes, or other disposable objects. 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');
  };
code »
getDisposed() boolean
Use #isDisposed instead. No description.
Returns: boolean  Whether the object has been disposed of.
code »
isDisposed() boolean
No description.
Returns: boolean  Whether the object has been disposed of.
code »
registerDisposable(disposable)
Associates a disposable object with this object so that they will be disposed together.
Arguments:
disposable : goog.disposable.IDisposable
that will be disposed when this object is disposed.
code »

Instance Properties

constructor :
No description.
Code »
The DOM helper for this document.
Code »
An event handler for listening to popups and the like.
Code »
iframePool_ : goog.structs.Pool
An iframe pool.
Code »
iframe_ :
An iframe.
Code »
opacity_ :
The opacity of the iframe mask, expressed as a value between 0 and 1, with 1 being totally opaque.
Code »
snapElement_ :
An Element to snap the mask to. If none is given, defaults to a full-screen iframe mask.
Code »
zIndex_ :
The z-index of the iframe mask.
Code »
creationStack :
If monitoring the goog.Disposable instances is enabled, stores the creation stack trace of the Disposable instance.
Code »
disposed_ :
Whether the object has been disposed of.
Code »
onDisposeCallbacks_ :
Callbacks to invoke when this object is disposed.
Code »

Static Properties

goog.ui.IframeMask.HIDDEN_CSS_TEXT_ :
CSS for a hidden iframe.
Code »
goog.ui.IframeMask.superClass_ :
No description.
Code »

Package ui

Package Reference