나는 bokeh를 Bokeh 서버 응용 프로그램으로 실행 중입니다.Bokeh에서 메서드를 재정의하는 방법은 무엇입니까? 모든 요소가 이미 페이지에 렌더링되었는지 확인하는 방법?
모든 항목이 이미 페이지에 렌더링되었을 때 일부 작업을 수행하고 싶습니다. 그래서 메시지가 this file에 인쇄 된 것을 발견했습니다. 메시지 뒤에 몇 가지 코드를 어떻게 실행할 수 있습니까? 서버가로드되고 모든 요소가 렌더링되었는지 확인할 수있는 플래그가 있습니까? bokeh의 메서드를 재정의 할 수 있습니까?
if promise != null
promise.then(
(value) ->
console.log("Bokeh items were rendered successfully")
(error) ->
console.log("Error rendering Bokeh items ", error)
)
이로
업데이트 내가 그 동안 해결 방법을 발견, 여전히 수 없습니다 :
oldLog = console.log;
console.log = function (message) {
if(message.localeCompare('Bokeh items were rendered successfully') == 0){
window.top.postMessage('show-bokeh-iframe', '*')
console.log = oldLog;
}
oldLog.apply(console, arguments);
};
예, 사실 하나 발견했습니다. 나는 내 대답을 내가 한 일로 업데이트했다. 답을 쓰는 데 시간을 내 주셔서 감사합니다. – ChesuCR