better browser titles

This commit is contained in:
Chris Wanstrath
2011-11-13 21:28:25 -08:00
parent 4121617a9c
commit 0bb0279f07

View File

@@ -23,5 +23,11 @@ class Browser extends Resource
super
iframe = @pane.find('iframe')[0]
if innerHTML
@pane.find('iframe')[0].contentWindow.document.body.innerHTML = innerHTML
iframe.contentWindow.document.body.innerHTML = innerHTML
window.setTitle iframe.contentWindow.document.title
$(iframe).bind 'load', (e) =>
window.setTitle e.target.contentWindow.document.title