jcompagner wrote:So to really have this working you have to really delete the link node from the dom or set the href property of the right node to zero (or maybe update it to a new one)
But this is quite change in a specific behavior that we have to implement then
Tested the following code snippets with Chrome developer tools:
- Code: Select all
// store style sheet link
var x = $('link[rel=stylesheet][href*="CRM2_0F_companies_0_"]')[0]
// remove style sheet from the dom
$('link[rel=stylesheet][href*="CRM2_0F_companies_0_"]').remove()
// add style sheet back to the dom
$('head').append(x)
// define link for slightly modified css style sheet
var y = '<link rel="stylesheet" type="text/css" href="http://localhost:8080/testing/style_test.css">'
// add modified style sheet to the dom
$('head').append(y)
Works pretty slick -- no page flicker, instantaneous style application, no complete blanking out the window. Depending on how much dom manipulation is going on when recreateUI() is called, I would expect recreateUI() to be about as fast and smooth as changing records on the one hand (very little browser re-render happening) to changing tab panels on the other (quite a bit of browser re-render happening).