org.teavm.jso.browser.Window.current()方法的使用及代码示例

x33g5p2x  于2022-02-03 转载在 其他  
字(3.7k)|赞(0)|评价(0)|浏览(87)

本文整理了Java中org.teavm.jso.browser.Window.current()方法的一些代码示例,展示了Window.current()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Window.current()方法的具体详情如下:
包路径:org.teavm.jso.browser.Window
类名称:Window
方法名:current

Window.current介绍

暂无

代码示例

代码示例来源:origin: konsoletyper/teavm

public static Storage getSessionStorage() {
  return Window.current().getSessionStorage();
}

代码示例来源:origin: konsoletyper/teavm

static History current() {
    return Window.current().getHistory();
  }
}

代码示例来源:origin: konsoletyper/teavm

public static Storage getLocalStorage() {
    return Window.current().getLocalStorage();
  }
}

代码示例来源:origin: konsoletyper/teavm

static HTMLDocument current() {
  return Window.current().getDocument();
}

代码示例来源:origin: konsoletyper/teavm

static Location current() {
    return Window.current().getLocation();
  }
}

代码示例来源:origin: konsoletyper/teavm

static Screen current() {
    return Window.current().getScreen();
  }
}

代码示例来源:origin: konsoletyper/teavm-flavour

public RouteBinder() {
  this(Window.current());
}

代码示例来源:origin: org.teavm.flavour/teavm-flavour-routing

static <T extends Route> T replace(Class<T> routeType) {
    return replace(Window.current(), routeType);
  }
}

代码示例来源:origin: konsoletyper/teavm-flavour

static <T extends Route> T replace(Class<T> routeType) {
    return replace(Window.current(), routeType);
  }
}

代码示例来源:origin: org.teavm.flavour/teavm-flavour-routing

default boolean parse() {
  return parse(Window.current());
}

代码示例来源:origin: konsoletyper/teavm-flavour

default boolean parse() {
  return parse(Window.current());
}

代码示例来源:origin: org.teavm.flavour/teavm-flavour-routing

public static <T extends Route> T open(Class<T> routeType) {
  return open(Window.current(), routeType);
}

代码示例来源:origin: konsoletyper/teavm-flavour

public static <T extends Route> T open(Class<T> routeType) {
  return open(Window.current(), routeType);
}

代码示例来源:origin: konsoletyper/teavm-flavour

public void getPageLink(int pageNumber, Consumer<String> consumer) {
  if (linkGenerator != null) {
    linkGenerator.accept(pageNumber, consumer);
  } else {
    consumer.accept(Window.current().getLocation().getHash());
  }
}

代码示例来源:origin: konsoletyper/teavm-libgdx

@Override
public DisplayMode[] getDisplayModes() {
  Window window = Window.current();
  Screen screen = window.getScreen();
  return new DisplayMode[] { new DisplayMode(screen.getWidth(), screen.getHeight(), 60, 8) {}};
}

代码示例来源:origin: konsoletyper/teavm-flavour

private void replaceHash() {
  if (linkGenerator == null) {
    return;
  }
  linkGenerator.accept(pageable.getCurrentPage(), hash -> {
    if (hash != null) {
      Window.current().getHistory().replaceState(null, "", "#" + Window.encodeURI(hash));
    }
  });
}

代码示例来源:origin: konsoletyper/teavm-flavour

@Override
  public void render() {
    T computedValue = value.get();
    if (cacheInitialized && Objects.equals(cachedValue, computedValue)) {
      return;
    }
    cacheInitialized = true;
    cachedValue = computedValue;
    if (textSlot != null) {
      textSlot.delete();
      textSlot = null;
    }
    textSlot = new NodeHolder(Window.current().getDocument().createTextNode(String.valueOf(computedValue)));
    getSlot().append(textSlot);
  }
}

代码示例来源:origin: org.teavm.flavour/teavm-flavour-templates

public static Component bind(Object model, String id) {
  return bind(model, Window.current().getDocument().getElementById(id));
}

代码示例来源:origin: konsoletyper/teavm-flavour

public static Component bind(Object model, String id) {
  return bind(model, Window.current().getDocument().getElementById(id));
}

代码示例来源:origin: org.teavm.flavour/teavm-flavour-templates

@Override
  public void render() {
    T computedValue = value.get();
    if (cacheInitialized && Objects.equals(cachedValue, computedValue)) {
      return;
    }
    cacheInitialized = true;
    cachedValue = computedValue;
    if (textSlot != null) {
      textSlot.delete();
      textSlot = null;
    }
    textSlot = new NodeHolder(Window.current().getDocument().createTextNode(String.valueOf(computedValue)));
    getSlot().append(textSlot);
  }
}

相关文章