Skip to content

Instantly share code, notes, and snippets.

@meriouma meriouma/ Secret
Created May 12, 2015

What would you like to do?
The hard way
public class MyViewImpl implements MyView, AttachEvent.Handler {
interface Binder extends UiBinder<Widget, MyViewImpl> {}
private final Widget widget;
MyViewImpl(Binder binder) {
widget = binder.createAndBindUi(this);
public void onAttachOrDetach(AttachEvent event) {
if (event.isAttached()) {
Document.get().setTitle("This is the new title of the page");
private void updateMetaTags() {
injectMetaProperty("description", "This is the description");
injectMetaProperty("og:image", "");
// ...
private void injectMetaProperty(String property, String value) {
Document document = Document.get();
MetaElement metaElement = document.createMetaElement();
// ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.