Is it possible to achieve compatibility with ie7's document.createElement () through the chrome plug-in?

if you want to open an old website in a newer browser, the main reason why you can"t open it is that there is such a code

.
document.createElement("<div class="class"></div>");

what"s more, there is such a

.
document.createElement("<div class="class"><div><div></div></div></div>");

to achieve compatibility, you can also replace document.createElement ()

.

how can I make sure this replacement works?


rewrite document.createElement and then parse it yourself, which is not recommended.

var original_fn = document.createElement
document.createElement = function(name) {
    if (/^\w+$/.test(name)) {
        return original_fn.call(document, name)
    }
    // 
    var div = original_fn.call(document, 'div')
    div.innerHTML = name
    return div.firstChild
}
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1bf767e-3206d.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1bf767e-3206d.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?