src/cm/utils/misc.py
author Production Moz <dev@sopinspace.com>
Sun, 27 Jan 2013 11:19:55 +0100
changeset 491 50eeeb10e960
parent 0 40c8f766c9b8
permissions -rw-r--r--
Since scrollIntoView scroll the embed iframe *and* the parent window, save and restore the position of the toolbar.


def update(obj, kwargs):
    """
    Update obj attributes with values from kwargs
    """
    for k,v in kwargs.items():
        if hasattr(obj,k):
            setattr(obj,k,v)