

def activate_css(targetnode):
    scriptnodes = list(targetnode.getElementsByTagName('link'))
    for LC in range(len(scriptnodes)):
        sn = scriptnodes[LC]
        sn.parentNode.removeChild(fileref)
        fileref = DOM.createElement('link')
        if hassattr(sn, 'href'):
            fileref.href = sn.href
        else:
            fileref.text = sn.text
        fileref.rel = 'stylesheet'
        fileref.type = 'text/css'
        doc().getElementsByTagName('head').item(0).appendChild(fileref)

dataset/ETHPy150Open anandology/pyjamas/library/dynamic.py activate_css/VarMisuse@48/66 `sn`->`fileref`