Why Gemfury? Push, build, and install  RubyGems npm packages Python packages Maven artifacts PHP packages Go Modules Debian packages RPM packages NuGet packages

Repository URL to install this package:

Details    
bokeh / server / static / js / lib / models / sources / server_sent_data_source.js
Size: Mime:
import { WebDataSource } from "./web_data_source";
export class ServerSentDataSource extends WebDataSource {
    constructor(attrs) {
        super(attrs);
        this.initialized = false;
    }
    setup() {
        if (!this.initialized) {
            this.initialized = true;
            const source = new EventSource(this.data_url);
            source.onmessage = (event) => {
                this.load_data(JSON.parse(event.data), this.mode, this.max_size ?? undefined);
            };
        }
    }
}
ServerSentDataSource.__name__ = "ServerSentDataSource";
//# sourceMappingURL=server_sent_data_source.js.map