Commit 660bf572 authored by Kristof Csillag's avatar Kristof Csillag

Merge pull request #1597 from hypothesis/dont-swallow-exceptions

Don't swallow exceptions when scanning the document
parents e944a5be 5321f450
...@@ -71,7 +71,7 @@ class Annotator.Guest extends Annotator ...@@ -71,7 +71,7 @@ class Annotator.Guest extends Annotator
unless config.dontScan unless config.dontScan
# Scan the document text with the DOM Text libraries # Scan the document text with the DOM Text libraries
this.scanDocument "Guest initialized" this._scan()
# Watch for newly rendered highlights, and update positions in sidebar # Watch for newly rendered highlights, and update positions in sidebar
this.subscribe "highlightsCreated", (highlights) => this.subscribe "highlightsCreated", (highlights) =>
...@@ -197,14 +197,6 @@ class Annotator.Guest extends Annotator ...@@ -197,14 +197,6 @@ class Annotator.Guest extends Annotator
@plugins.Heatmap._scheduleUpdate() @plugins.Heatmap._scheduleUpdate()
) )
scanDocument: (reason = "something happened") =>
try
console.log "Analyzing host frame, because " + reason + "..."
this._scan()
catch e
console.log e.message
console.log e.stack
_setupWrapper: -> _setupWrapper: ->
@wrapper = @element @wrapper = @element
.on 'click', (event) => .on 'click', (event) =>
......
...@@ -36,7 +36,7 @@ class Annotator.Host extends Annotator.Guest ...@@ -36,7 +36,7 @@ class Annotator.Host extends Annotator.Guest
this.showFrame() this.showFrame()
# Scan the document # Scan the document
this.scanDocument "Host initialized" this._scan()
_setupXDM: (options) -> _setupXDM: (options) ->
channel = super channel = super
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment