What\'s the suggested \"best practice\" way to use Knockout\'s \"attr\" data binding with standalone attributes like \"readonly\" and
Knockout's "attr" data binding does support this scenario just return null or undefined from your getDisabledState() function then it won't emit the attribute.
null
undefined
getDisabledState()
Demo Fiddle.