Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
R
renderjs
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Xiaowu Zhang
renderjs
Commits
689c76ae
Commit
689c76ae
authored
Dec 04, 2014
by
Romain Courteaud
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Ensure iframe methods return RSVP.Queue.
parent
f510b4c6
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
27 additions
and
14 deletions
+27
-14
renderjs.js
renderjs.js
+18
-14
test/renderjs_test.js
test/renderjs_test.js
+9
-0
No files found.
renderjs.js
View file @
689c76ae
...
@@ -505,8 +505,8 @@
...
@@ -505,8 +505,8 @@
gadget_instance
.
__chan
.
bind
(
"
declareMethod
"
,
gadget_instance
.
__chan
.
bind
(
"
declareMethod
"
,
function
(
trans
,
method_name
)
{
function
(
trans
,
method_name
)
{
gadget_instance
[
method_name
]
=
function
()
{
gadget_instance
[
method_name
]
=
function
()
{
var
argument_list
=
arguments
;
var
argument_list
=
arguments
,
return
new
RSVP
.
Promise
(
function
(
resolve
,
reject
)
{
wait_promise
=
new
RSVP
.
Promise
(
function
(
resolve
,
reject
)
{
gadget_instance
.
__chan
.
call
({
gadget_instance
.
__chan
.
call
({
method
:
"
methodCall
"
,
method
:
"
methodCall
"
,
params
:
[
params
:
[
...
@@ -520,6 +520,10 @@
...
@@ -520,6 +520,10 @@
}
}
});
});
});
});
return
new
RSVP
.
Queue
()
.
push
(
function
()
{
return
wait_promise
;
});
};
};
return
"
OK
"
;
return
"
OK
"
;
});
});
...
...
test/renderjs_test.js
View file @
689c76ae
...
@@ -3248,6 +3248,15 @@
...
@@ -3248,6 +3248,15 @@
.
then
(
function
(
new_gadget
)
{
.
then
(
function
(
new_gadget
)
{
return
new
RSVP
.
Queue
()
return
new
RSVP
.
Queue
()
// Method returns an RSVP.Queue
.
push
(
function
()
{
var
result
=
new_gadget
.
wasReadyCalled
();
ok
(
result
instanceof
RSVP
.
Queue
,
"
iframe method should return Queue
"
);
})
// Check that ready function are called
// Check that ready function are called
.
push
(
function
()
{
.
push
(
function
()
{
return
new_gadget
.
wasReadyCalled
();
return
new_gadget
.
wasReadyCalled
();
...
...
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