mirror of
https://github.com/Azure/cosmos-explorer.git
synced 2025-01-23 17:30:23 +00:00
17 lines
752 B
TypeScript
17 lines
752 B
TypeScript
import { BindingHandlersRegisterer } from "./Bindings/BindingHandlersRegisterer";
|
|
import { sendMessage } from "./Common/MessageHandler";
|
|
import * as ko from "knockout";
|
|
import Explorer from "./Explorer/Explorer";
|
|
|
|
export const applyExplorerBindings = (explorer: Explorer) => {
|
|
if (!!explorer) {
|
|
ko.applyBindings(explorer);
|
|
// This message should ideally be sent immediately after explorer has been initialized for optimal data explorer load times.
|
|
// TODO: Send another message to describe that the bindings have been applied, and handle message transfers accordingly in the portal
|
|
sendMessage("ready");
|
|
window.dataExplorer = explorer;
|
|
BindingHandlersRegisterer.registerBindingHandlers();
|
|
$("#divExplorer").show();
|
|
}
|
|
};
|