def inject(values, namespace = None, names=None):
    if namespace is None:
        from __pyjamas__ import JS
        namespace = JS("$pyjs.global_namespace")
    values = dict(values)
    if names is None:
        for k in values:
            v = values[k]
            JS("""@{{namespace}}[@{{k}}] = @{{v}};""")
    else:
        for k in names:
            v = values[k]
            JS("""@{{namespace}}[@{{k}}] = @{{v}};""")

#
#  activate_css(str)
# 
#  looks for any < link > in the input and sets up a corresponding link node
#  in the main document.
#
dataset/ETHPy150Open anandology/pyjamas/library/dynamic.py/inject/original