use a decorator to allow cross browser API access. Very pythonic