Tell Javascript about focus changes.