custombuttonrenderer.js
No description.

File Location

/goog/ui/custombuttonrenderer.js

Classes

goog.ui.CustomButtonRenderer
Custom renderer for goog.ui.Buttons. Custom buttons can contain almost arbitrary HTML content, will flow like inline elements, but can be styled like block-level elements.

Public Protected Private

Global Functions

goog.ui.CustomButtonRenderer.getInstance()
No description.
code »
goog.ui.CustomButtonRenderer.trimTextNodes_(elementfromStart)
Takes an element and removes leading or trailing whitespace from the start or the end of its list of child nodes. The Boolean argument determines whether to trim from the start or the end of the node list. Empty text nodes are removed, and the first non-empty text node is trimmed from the left or the right as appropriate. For example,
#text "" #text "\n Hello " ... #text " World! \n" #text ""
becomes
#text "Hello " ... #text " World!"
This is essential for Gecko, where leading/trailing whitespace messes with the layout of elements with -moz-inline-box (used in goog-inline-block), and optional but harmless for non-Gecko.
Arguments:
element : Element
Element whose child node list is to be trimmed.
fromStart : boolean
Whether to trim from the start or from the end.
code »

Directory ui

File Reference