toggle: Fix incompatability between javascript and webkit.