Commit bf3bb35a authored by Romain Courteaud's avatar Romain Courteaud

Release version 0.7.4

parent 689c76ae
This diff is collapsed.
This diff is collapsed.
...@@ -657,6 +657,14 @@ ...@@ -657,6 +657,14 @@
}; };
}(DOMParser)); }(DOMParser));
;// IE does not support have Document.prototype.contains.
if (typeof document.contains !== 'function') {
Document.prototype.contains = function(node) {
if (node === this || node.parentNode === this)
return true;
return this.documentElement.contains(node);
}
}
;/*! RenderJs */ ;/*! RenderJs */
/*jslint nomen: true*/ /*jslint nomen: true*/
...@@ -1164,8 +1172,8 @@ ...@@ -1164,8 +1172,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: [
...@@ -1179,6 +1187,10 @@ ...@@ -1179,6 +1187,10 @@
} }
}); });
}); });
return new RSVP.Queue()
.push(function () {
return wait_promise;
});
}; };
return "OK"; return "OK";
}); });
...@@ -1564,6 +1576,7 @@ ...@@ -1564,6 +1576,7 @@
if (document_element.nodeType === 9) { if (document_element.nodeType === 9) {
settings.title = document_element.title; settings.title = document_element.title;
if (document_element.head !== null) {
for (i = 0; i < document_element.head.children.length; i += 1) { for (i = 0; i < document_element.head.children.length; i += 1) {
element = document_element.head.children[i]; element = document_element.head.children[i];
if (element.href !== null) { if (element.href !== null) {
...@@ -1579,13 +1592,15 @@ ...@@ -1579,13 +1592,15 @@
settings.required_js_list.push( settings.required_js_list.push(
renderJS.getAbsoluteURL(element.getAttribute("src"), url) renderJS.getAbsoluteURL(element.getAttribute("src"), url)
); );
} else if (element.rel === "http://www.renderjs.org/rel/interface") { } else if (element.rel ===
"http://www.renderjs.org/rel/interface") {
settings.interface_list.push( settings.interface_list.push(
renderJS.getAbsoluteURL(element.getAttribute("href"), url) renderJS.getAbsoluteURL(element.getAttribute("href"), url)
); );
} }
} }
} }
}
} else { } else {
throw new Error("The first parameter should be an HTMLDocument"); throw new Error("The first parameter should be an HTMLDocument");
} }
......
This diff is collapsed.
{ {
"name": "renderjs", "name": "renderjs",
"version": "0.7.3", "version": "0.7.4",
"description": "RenderJs provides HTML5 gadgets", "description": "RenderJs provides HTML5 gadgets",
"main": "dist/renderjs-latest.js", "main": "dist/renderjs-latest.js",
"dependencies": { "dependencies": {
......
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