Skip to content

Dependency on hxnodejs is causing issues with socket.io in browser #150

@back2dos

Description

@back2dos

This is a follow up on #141, however the problems we encounter are more far-reaching.

Among other things hxnodejs:

I'm not sure how to deal with this. As far as socket IO is concerned, I wonder though if the nodejs dependency is all that useful. From the looks of it, it really just uses EventEmitter.

Maybe this would work:

package js.npm.socketio;

#if nodejs
typedef EventEmitter<T> = js.node.events.EventEmitter;
#else
extern class EventEmitter<T> {
  // ...
}
#end

I guess down the line the real question is though whether haxe-js-kit is really intended for pure browser development (i.e. not electron or some other environment that has access to the nodejs APIs).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions