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
98366f3d
Commit
98366f3d
authored
Jan 27, 2015
by
Aron Carroll
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Inject cross frame constructors into CF service
parent
553836a8
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
18 additions
and
4 deletions
+18
-4
cross-frame-bridge.coffee
h/static/scripts/cross-frame-bridge.coffee
+5
-2
cross-frame-discovery.coffee
h/static/scripts/cross-frame-discovery.coffee
+3
-0
cross-frame-service.coffee
h/static/scripts/cross-frame-service.coffee
+10
-2
No files found.
h/static/scripts/cross-frame-bridge.coffee
View file @
98366f3d
...
...
@@ -34,7 +34,7 @@ class CrossFrameBridge
channel
=
this
.
_buildChannel
channelOptions
# Attach channel message listeners
for
method
,
callback
of
@
channelListeners
for
own
method
,
callback
of
@
channelListeners
channel
.
bind
method
,
callback
# Store the newly created channel in our collection
...
...
@@ -107,3 +107,6 @@ class CrossFrameBridge
(
options
.
origin
.
match
/^resource:\/\//
)
options
=
$
.
extend
{},
options
,
{
origin
:
'*'
}
channel
=
Channel
.
build
(
options
)
if
typeof
angular
!=
'undefined'
angular
.
module
(
'h'
).
value
(
'CrossFrameBridge'
,
CrossFrameBridge
)
h/static/scripts/cross-frame-discovery.coffee
View file @
98366f3d
...
...
@@ -106,3 +106,6 @@ class CrossFrameDiscovery
@
requestInProgress
=
false
# value should not actually matter anymore.
discovered
=
true
return
{
reply
:
reply
,
discovered
:
discovered
,
token
:
token
}
if
typeof
angular
!=
'undefined'
angular
.
module
(
'h'
).
value
(
'CrossFrameDiscovery'
,
CrossFrameDiscovery
)
h/static/scripts/cross-frame-service.coffee
View file @
98366f3d
...
...
@@ -2,8 +2,16 @@
class
CrossFrameService
providers
:
null
this
.
inject
=
[
'$rootScope'
,
'$document'
,
'$window'
,
'store'
,
'annotationUI'
]
constructor
:
(
$rootScope
,
$document
,
$window
,
store
,
annotationUI
)
->
this
.
inject
=
[
'$rootScope'
,
'$document'
,
'$window'
,
'store'
,
'annotationUI'
'CrossFrameDiscovery'
,
'CrossFrameBridge'
,
'AnnotationSync'
,
'AnnotationUISync'
]
constructor
:
(
$rootScope
,
$document
,
$window
,
store
,
annotationUI
CrossFrameDiscovery
,
CrossFrameBridge
,
AnnotationSync
,
AnnotationUISync
)
->
@
providers
=
[]
createDiscovery
=
->
...
...
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