Use XPCOM object for new API