From da3e1e361eea151c253f3028b4fd61bcc856a723 Mon Sep 17 00:00:00 2001 From: Tobie Langel Date: Fri, 23 Oct 2009 04:10:30 +0200 Subject: [PATCH] Clean-up. --- src/dom/selector.js | 10 ++++++++++ src/dom/sizzle_adapter.js | 17 +++++++---------- 2 files changed, 17 insertions(+), 10 deletions(-) diff --git a/src/dom/selector.js b/src/dom/selector.js index e011521..b8b0331 100644 --- a/src/dom/selector.js +++ b/src/dom/selector.js @@ -89,3 +89,13 @@ } }); })(); + +/** related to: Selector + * $$(expression...) -> [Element...] + * + * Returns all elements in the document that match the provided CSS selectors. +**/ +window.$$ = function() { + var expression = $A(arguments).join(', '); + return Prototype.Selector.select(expression, document); +}; \ No newline at end of file diff --git a/src/dom/sizzle_adapter.js b/src/dom/sizzle_adapter.js index 71ad3ee..26249eb 100644 --- a/src/dom/sizzle_adapter.js +++ b/src/dom/sizzle_adapter.js @@ -1,4 +1,10 @@ +Prototype._original_sizzle = window.Sizzle; //= require +Prototype.Sizzle = window.Sizzle; + +// Restore globals. +window.Sizzle = Prototype._original_sizzle; +delete Prototype._original_sizzle; Prototype.Selector = (function(Sizzle) { function extend(elements) { @@ -24,14 +30,5 @@ Prototype.Selector = (function(Sizzle) { match: match, filter: filter }; -})(Sizzle); +})(Prototype.Sizzle); -/** related to: Selector - * $$(expression...) -> [Element...] - * - * Returns all elements in the document that match the provided CSS selectors. -**/ -window.$$ = function() { - var expression = $A(arguments).join(', '); - return Prototype.Selector.select(expression, document); -}; \ No newline at end of file