Skip to content

Commit

Permalink
spelling: javascript
Browse files Browse the repository at this point in the history
  • Loading branch information
jsoref committed Sep 24, 2017
1 parent 76570f6 commit 3f6c0d0
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion spec/mappingHelperBehaviors.js
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ describe('Mapping helpers', function() {
var date = new Date();
var string = new String();
var number = new Number();
var booleanValue = new Boolean(); // 'boolean' is a resever word in Javascript
var booleanValue = new Boolean(); // 'boolean' is a resever word in JavaScript

var result = ko.toJS({
regExp: ko.observable(regExp),
Expand Down
10 changes: 5 additions & 5 deletions src/binding/defaultBindings/attr.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
var attrHtmlToJavascriptMap = { 'class': 'className', 'for': 'htmlFor' };
var attrHtmlToJavaScriptMap = { 'class': 'className', 'for': 'htmlFor' };
ko.bindingHandlers['attr'] = {
'update': function(element, valueAccessor, allBindings) {
var value = ko.utils.unwrapObservable(valueAccessor()) || {};
Expand All @@ -12,12 +12,12 @@ ko.bindingHandlers['attr'] = {
if (toRemove)
element.removeAttribute(attrName);

// In IE <= 7 and IE8 Quirks Mode, you have to use the Javascript property name instead of the
// In IE <= 7 and IE8 Quirks Mode, you have to use the JavaScript property name instead of the
// HTML attribute name for certain attributes. IE8 Standards Mode supports the correct behavior,
// but instead of figuring out the mode, we'll just set the attribute through the Javascript
// but instead of figuring out the mode, we'll just set the attribute through the JavaScript
// property for IE <= 8.
if (ko.utils.ieVersion <= 8 && attrName in attrHtmlToJavascriptMap) {
attrName = attrHtmlToJavascriptMap[attrName];
if (ko.utils.ieVersion <= 8 && attrName in attrHtmlToJavaScriptMap) {
attrName = attrHtmlToJavaScriptMap[attrName];
if (toRemove)
element.removeAttribute(attrName);
else
Expand Down

0 comments on commit 3f6c0d0

Please sign in to comment.