Remove old switchFallback code
This commit is contained in:
committed by
Robin North
parent
70f6383702
commit
5ec0ce09e1
@@ -25,10 +25,9 @@ module.exports = function(options) {
|
||||
options.debug = options.debug || false
|
||||
options.timeout = options.timeout || 0
|
||||
|
||||
// we can’t replace body.outerHTML or head.outerHTML
|
||||
// it create a bug where new body or new head are created in the dom
|
||||
// if you set head.outerHTML, a new body tag is appended, so the dom get 2 body
|
||||
// & it break the switchFallback which replace head & body
|
||||
// We can’t replace body.outerHTML or head.outerHTML.
|
||||
// It creates a bug where a new body or head are created in the DOM.
|
||||
// If you set head.outerHTML, a new body tag is appended, so the DOM has 2 body nodes, and vice versa
|
||||
if (!options.switches.head) {
|
||||
options.switches.head = defaultSwitches.switchElementsAlt
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user