Java Code Examples for com.google.gwt.dom.client.Element#getInnerHTML()

The following examples show how to use com.google.gwt.dom.client.Element#getInnerHTML() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: Clipboard.java    From swellrt with Apache License 2.0 6 votes vote down vote up
/**
 * Extract waveXml from this container.
 *
 * @param srcContainer
 */
public String maybeGetWaveXml(Element srcContainer) {
  String waveXml = maybeGetAttributeFromContainer(srcContainer, WAVE_XML_ATTRIBUTE);
  String x = srcContainer.getInnerHTML();
  if (waveXml != null) {
    LOG.trace().logPlainText("found serialized waveXml: " + waveXml);

    // NOTE(user): Ensure waveXml does not contain any new line characters.
    // FF36+ adds random new lines the attributes
    // https://bugzilla.mozilla.org/show_bug.cgi?id=540979
    // We filter on all browsers, so they can accept content from FF36.
    waveXml = waveXml.replace("\n", "");
  }

  return waveXml;
}
 
Example 2
Source File: NavSpy.java    From putnami-web-toolkit with GNU Lesser General Public License v3.0 6 votes vote down vote up
NavWidget(NavWidget parentNav, final Element heading) {
	super(heading.getInnerHTML(), new ScheduledCommand() {
		@Override
		public void execute() {
			int top = NavSpy.this.getElementTop(heading) - NavSpy.this.spyOffset;
			if (NavSpy.this.isBodyScrollWidget()) {
				Window.scrollTo(Document.get().getScrollLeft(), top);
			} else {
				NavSpy.this.scrollWidget.getElement().setScrollTop(top);
			}
		}
	});

	this.parentNav = parentNav;
	this.level = NavSpy.this.getLevel(heading);
}
 
Example 3
Source File: Clipboard.java    From incubator-retired-wave with Apache License 2.0 6 votes vote down vote up
/**
 * Extract waveXml from this container.
 *
 * @param srcContainer
 */
public String maybeGetWaveXml(Element srcContainer) {
  String waveXml = maybeGetAttributeFromContainer(srcContainer, WAVE_XML_ATTRIBUTE);
  String x = srcContainer.getInnerHTML();
  if (waveXml != null) {
    LOG.trace().logPlainText("found serialized waveXml: " + waveXml);

    // NOTE(user): Ensure waveXml does not contain any new line characters.
    // FF36+ adds random new lines the attributes
    // https://bugzilla.mozilla.org/show_bug.cgi?id=540979
    // We filter on all browsers, so they can accept content from FF36.
    waveXml = waveXml.replace("\n", "");
  }

  return waveXml;
}