core/OperationBuilder.js
function fieldAssign(elem, field, val) {
        try {
            $(exports).triggerHandler('fieldAssign', [elem, field, val]);
        } catch (err) {
            console.error(err);
        }
        var isCustomField = (elem[field] && elem[field].__read);
        var oldVal;
        if (isCustomField) {
            oldVal = elem[field].__write();
        } else {
            oldVal = elem[field];
        }
        _currentOperation.ops.push({
            op: OP_FIELD_ASSIGN,
            arg: {
                _id: elem._id,
                f: field,
                n: val,
                o: oldVal
            }
        });
    }
function fieldAssign(elem, field, val) {
        try {
            $(exports).triggerHandler('fieldAssign', [elem, field, val]);
        } catch (err) {
            console.error(err);
        }
        var isCustomField = (elem[field] && elem[field].__read);
        var oldVal;
        if (isCustomField) {
            oldVal = elem[field].__write();
        } else {
            oldVal = elem[field];
        }
        _currentOperation.ops.push({
            op: OP_FIELD_ASSIGN,
            arg: {
                _id: elem._id,
                f: field,
                n: val,
                o: oldVal
            }
        });
    }
function fieldAssign ( elem , field , val ) { try { $ ( exports ) . triggerHandler ( 'fieldAssign' , [ elem , field , val ] ) ; } catch ( err ) { console . error ( err ) ; } var isCustomField = ( elem [ field ] && elem [ field ] . __read ) ; var oldVal ; if ( isCustomField ) { oldVal = elem [ field ] . __write ( ) ; } else { oldVal = elem [ field ] ; } _currentOperation . ops . push ( { op : OP_FIELD_ASSIGN , arg : { _id : elem . _id , f : field , n : val , o : oldVal } } ) ; }
Assign value to field.

@param {Element} elem
@param {string} field
@param {?} val
Assign value to field .