Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
coopwire-hypothesis
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
孙灵跃 Leon Sun
coopwire-hypothesis
Commits
660bf572
Commit
660bf572
authored
Oct 25, 2014
by
Kristof Csillag
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #1597 from hypothesis/dont-swallow-exceptions
Don't swallow exceptions when scanning the document
parents
e944a5be
5321f450
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
10 deletions
+2
-10
guest.coffee
h/static/scripts/guest.coffee
+1
-9
host.coffee
h/static/scripts/host.coffee
+1
-1
No files found.
h/static/scripts/guest.coffee
View file @
660bf572
...
@@ -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
)
=>
...
...
h/static/scripts/host.coffee
View file @
660bf572
...
@@ -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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment