Using Pubnub in fuse

I am trying to use Pubnub with this but it seems like fuse is unable to initialize the instance. I return an error that says init is not a function. Has anyone tried to use pubnub and been successful?

it looks like fuse does not support document or navigator instance in javascript. this causes errors to be thrown on runtime saying that document and navigator are not defined. Anyway to get round that?

That depends on a case by case scenario. Obviously we can’t support the entire document Object, but sometimes it’s only small things that you need to make it work.

Just try out with some dummy shims and see how far you get:

window.navigator = this.navigator = {
    userAgent : ""
window.location = this.location = {
    href : "",
    origin : "",
    protocol : "",
    host : "",
    hostname : "",
    port : "",
    pathname : "",
    search : "",
    hash : "",
    assign : function(url) {},
    replace : function(url) {},
    reload : function() {}