Skip to content

Commit

Permalink
XWIKI-8193: Minor changes to prototype.js to make it more rewrite-fri…
Browse files Browse the repository at this point in the history
…endly
  • Loading branch information
mflorea authored and sdumitriu committed Dec 6, 2016
1 parent 2a2fc85 commit e94afda
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
5 changes: 3 additions & 2 deletions src/prototype/deprecated.js
Expand Up @@ -193,8 +193,8 @@ Object.extend(Element.ClassNames.prototype, Enumerable);
* A class that queries the document for elements that match a given CSS
* selector.
**/
(function() {
window.Selector = Class.create({
var Selector = (function() {
var Selector = Class.create({
/** deprecated
* new Selector(expression)
* - expression (String): A CSS selector.
Expand Down Expand Up @@ -288,4 +288,5 @@ Object.extend(Element.ClassNames.prototype, Enumerable);
return Prototype.Selector.select(selector, element || document);
}
});
return Selector;
})();
2 changes: 1 addition & 1 deletion src/prototype/dom/selector.js
Expand Up @@ -83,7 +83,7 @@
* $$('div:empty');
* // -> all DIVs without content (i.e., whitespace-only)
**/
window.$$ = function() {
var $$ = function() {
var expression = $A(arguments).join(', ');
return Prototype.Selector.select(expression, document);
};
Expand Down
2 changes: 1 addition & 1 deletion vendor/sizzle/selector_engine.js
Expand Up @@ -54,7 +54,7 @@ Prototype._original_property = window.Sizzle;
Prototype.Selector.engine = engine;
Prototype.Selector.select = select;
Prototype.Selector.match = match;
})(Sizzle);
})(window.Sizzle);

// Restore globals.
window.Sizzle = Prototype._original_property;
Expand Down

0 comments on commit e94afda

Please sign in to comment.