此解决方案必须使用 google 关闭 javascript 库,而不是任何其他 javascript 库。
当 url 加载时,我想动态打开一个拆分面板,其中一侧包含 iframe 中 url 的内容,另一侧包含有关正在发生的操作的日志信息。
下面是使用 google 闭包库的拆分面板的一般设置,但我不确定如何添加 iframe 并将其源设置为当前页面 url。
var lhs = new goog.ui.Component();
var rhs = new goog.ui.Component();
// Set up splitpane with already existing DOM.
var splitpane1 = new goog.ui.SplitPane(lhs, rhs,
goog.ui.SplitPane.Orientation.HORIZONTAL);
// Need to create an iframe with src of current url and add that to the rhs element.