ridethepony/django-fiber — Issue #66: Sandboxing of fiber dom elements
Author: h3
Created: 2012-02-18 20:20:43+00:00
State: open

Before fiber was released I worked on my own implementation of a frontend admin. My first version was using a technique similar to fiber, manipulating existing DOM and injecting stuff.

The problem with this technique is that everything is global, so the site's styles can override fiber's styles and the same is true for JavaScript.

The problem became apparent when I started using it on larger projects with multiple third party plugins and their CSS/JS. I encountered nasty namespace clashes which let me no choices to either change code in my front-admin or fork the third party project and fix it. Needless to say it quickly became a maintenance nightmare.

The ideal solution would of course to be able to use the [Shadow DOM](http://glazkov.com/2011/01/14/what-the-heck-is-shadow-dom/), but unfortunately this is not possible.

The closest thing I found to really sandbox my frontadmin and prevent any site level CSS or JavaScript to mess with it was to use iframes. So this is what I did for the second generation of my frontadmin and it works surprisingly well.

I don't know if this could work for fiber, but this is definitely a nice to have.