I am using a Java Applet to read information from a card reader. So far the use cases I needed was:
I want to change the PIN on the card. The user is clicking a button and then I set the jscode of the htjscall object. This is working fine.
In this cases the communication starts always from the enterpise client framework.
Now I need to recognize if the user is removing the card from the card reader. For that the Java Applet is polling the card reader and if the card is removed the Java Applet would like to call a Java Script method or something else.