Software: Apache/2.2.22 (Debian). PHP/5.6.36 uname -a: Linux h05.hvosting.ua 4.9.110-amd64 #3 SMP Sun Nov 4 16:27:09 UTC 2018 x86_64 uid=1389(h33678) gid=1099(h33678) groups=1099(h33678),502(mgrsecure) Safe-mode: OFF (not secure) /home/h33678/data/www/it-man.ztu.edu.ua/bower_components/knockout/src/binding/defaultBindings/ drwxr-xr-x |
Viewing file: Select action/file-type: var attrHtmlToJavascriptMap = { 'class': 'className', 'for': 'htmlFor' }; ko.bindingHandlers['attr'] = { 'update': function(element, valueAccessor, allBindings) { var value = ko.utils.unwrapObservable(valueAccessor()) || {}; ko.utils.objectForEach(value, function(attrName, attrValue) { attrValue = ko.utils.unwrapObservable(attrValue); // To cover cases like "attr: { checked:someProp }", we want to remove the attribute entirely // when someProp is a "no value"-like value (strictly null, false, or undefined) // (because the absence of the "checked" attr is how to mark an element as not checked, etc.) var toRemove = (attrValue === false) || (attrValue === null) || (attrValue === undefined); if (toRemove) element.removeAttribute(attrName); // 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 // property for IE <= 8. if (ko.utils.ieVersion <= 8 && attrName in attrHtmlToJavascriptMap) { attrName = attrHtmlToJavascriptMap[attrName]; if (toRemove) element.removeAttribute(attrName); else element[attrName] = attrValue; } else if (!toRemove) { element.setAttribute(attrName, attrValue.toString()); } // Treat "name" specially - although you can think of it as an attribute, it also needs // special handling on older versions of IE (https://github.com/SteveSanderson/knockout/pull/333) // Deliberately being case-sensitive here because XHTML would regard "Name" as a different thing // entirely, and there's no strong reason to allow for such casing in HTML. if (attrName === "name") { ko.utils.setElementName(element, toRemove ? "" : attrValue.toString()); } }); } }; |
:: Command execute :: | |
--[ c99shell v. 2.0 [PHP 7 Update] [25.02.2019] maintained by PinoyWH1Z | C99Shell Github | Generation time: 0.0381 ]-- |