Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6845073
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T00:27:19+00:00 2026-05-27T00:27:19+00:00

I would like my GWT widget to be notified when its CSS animation is

  • 0

I would like my GWT widget to be notified when its CSS animation is over.

In plain HTML/Javascript this is easily done by registering an event handler like so:

elem.addEventListener("webkitAnimationEnd", function(){
    // do something
}, false);
// add more for Mozilla etc.

How can I do this in GWT?

This type of event is unknown to GWT’s DOMImpl classes, so I keep getting an error:

"Trying to sink unknown event type webkitAnimationEnd".

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T00:27:20+00:00Added an answer on May 27, 2026 at 12:27 am

    You can always write some of the native (JavaScript) code yourself:

    public class CssAnimation {
      public static native void registerCssCallback(
          Element elem, AsyncCallback<Void> callback) /*-{
        elem.addEventListener("webkitAnimationEnd", function() {
          $entry(@CssAnimation::cssCallback(Lcom/google/gwt/user/client/rpc/AsyncCallback;)(callback));
        }, false);
      }-*/;
    
    
      protected static void cssCallback(AsyncCallback<Void> callback) {
        callback.onSuccess(null);
      }
    }
    

    I haven’t tried the code above. Let me know if it works as expected.


    You can use GWT’s Animation class to achieve the same effect. For example,

      new com.google.gwt.animation.client.Animation() {
        final com.google.gwt.dom.client.Style es = widget.getElement().getStyle();
    
        @Override
        protected void onUpdate(double progress) {
          setOpacity(1 - interpolate(progress));
        }
    
        private void setOpacity(double opacity) {
          es.setProperty("opacity", Double.toString(opacity));
          es.setProperty("filter", "alpha(opacity=" + 100 * opacity + ")");
        }
    
        @Override
        protected void onComplete() {
          /* ... run some code when animation completes ... */
        }
      }.run(2000, 5000);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I would like to listen for the mouse over event in GWT 1.6. Since
I have a GWT based page that I would like to create an HTML
I have some code in HTML and CSS where HTML looks like this: <div
I would like my GWT program to be able to determine whether it's in
I'm developing application with GWT 2 and would like to add float panel that
I have a GWT module with the X-GWT-Module-Base http://host:8080/foo/ and would like to call
Does anyone know of a GWT widget that works like a spelling suggestor? Ideally
I have a block of HTML that I would like to use as the
I would like to run the GWT shell (the nice little Google pop-up browser
I'll use GWT for my next project but I would like to use some

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.