Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

dom manipulating functions will pass container to evalScripts

  • Loading branch information...
commit f78402b7ce0cd9f4286c7c63a13f7047d5315096 1 parent 7328fac
@juzna authored
Showing with 5 additions and 5 deletions.
  1. +5 −5 src/prototype/dom/dom.js
View
10 src/prototype/dom/dom.js
@@ -610,7 +610,7 @@ Element.Methods = {
})();
- function update(element, content) {
+ function update(element, content, scope) {
element = $(element);
var purgeElement = Element._purgeElement;
@@ -665,7 +665,7 @@ Element.Methods = {
element.innerHTML = content.stripScripts();
}
- content.evalScripts.bind(content).defer();
+ String.prototype.evalScripts.call(content, element, scope);
return element;
}
@@ -749,7 +749,7 @@ Element.Methods = {
content = Object.toHTML(content);
var range = element.ownerDocument.createRange();
range.selectNode(element);
- content.evalScripts.bind(content).defer();
+ content.evalScripts.bind(content, element).defer();
content = range.createContextualFragment(content.stripScripts());
}
element.parentNode.replaceChild(content, element);
@@ -831,7 +831,7 @@ Element.Methods = {
if (position == 'top' || position == 'after') childNodes.reverse();
childNodes.each(insert.curry(element));
- content.evalScripts.bind(content).defer();
+ content.evalScripts.bind(content, element).defer();
}
return element;
@@ -2991,7 +2991,7 @@ if ('outerHTML' in document.documentElement) {
}
else element.outerHTML = content.stripScripts();
- content.evalScripts.bind(content).defer();
+ content.evalScripts.bind(content, element).defer();
return element;
};
}
Please sign in to comment.
Something went wrong with that request. Please try again.