Skip to content

Commit

Permalink
Update the build
Browse files Browse the repository at this point in the history
  • Loading branch information
SteveSanderson committed Nov 7, 2011
1 parent 3f6e2cc commit 9d07b9d
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 32 deletions.
12 changes: 7 additions & 5 deletions build/output/knockout-latest.debug.js
Expand Up @@ -971,7 +971,6 @@ function prepareOptions(evaluatorFunctionOrOptions, evaluatorFunctionTarget, opt
// Multi-parameter syntax - construct the options according to the params passed
options = options || {};
options["read"] = evaluatorFunctionOrOptions || options["read"];
options["owner"] = evaluatorFunctionTarget || options["owner"];
}
// By here, "options" is always non-null

Expand Down Expand Up @@ -1035,7 +1034,8 @@ ko.dependentObservable = function (evaluatorFunctionOrOptions, evaluatorFunction
ko.dependencyDetection.begin(function(subscribable) {
_subscriptionsToDependencies.push(subscribable.subscribe(evaluatePossiblyAsync));
});
_latestValue = options["owner"] ? options["read"].call(options["owner"]) : options["read"]();
var valueForThis = options["owner"] || evaluatorFunctionTarget; // If undefined, it will default to "window" by convention. This might change in the future.
_latestValue = options["read"].call(valueForThis);
} finally {
ko.dependencyDetection.end();
}
Expand All @@ -1048,7 +1048,7 @@ ko.dependentObservable = function (evaluatorFunctionOrOptions, evaluatorFunction
if (arguments.length > 0) {
if (typeof options["write"] === "function") {
// Writing a value
var valueForThis = options["owner"]; // If undefined, it will default to "window" by convention. This might change in the future.
var valueForThis = options["owner"] || evaluatorFunctionTarget; // If undefined, it will default to "window" by convention. This might change in the future.
options["write"].apply(valueForThis, arguments);
} else {
throw "Cannot write a value to a dependentObservable unless you specify a 'write' option. If you wish to read the current value, don't pass any parameters.";
Expand Down Expand Up @@ -2164,8 +2164,10 @@ ko.bindingHandlers['uniqueName'] = {
if (valueAccessor()) {
element.name = "ko_unique_" + (++ko.bindingHandlers['uniqueName'].currentIndex);

// Workaround IE 6 issue - http://www.matts411.com/post/setting_the_name_attribute_in_ie_dom/
if (ko.utils.isIe6)
// Workaround IE 6/7 issue
// - https://github.com/SteveSanderson/knockout/issues/197
// - http://www.matts411.com/post/setting_the_name_attribute_in_ie_dom/
if (ko.utils.isIe6 || ko.utils.isIe7)
element.mergeAttributes(document.createElement("<input name='" + element.name + "'/>"), false);
}
}
Expand Down

0 comments on commit 9d07b9d

Please sign in to comment.