0

We are trying to mix frameworks like JQuery Mobile that like to take control of the DOM when they are functioning.

We want to allow the frameworks to manage the DOM as they want, but when we switch frameworks in our Javascript application we can kill the previous DOM and create a new one.

simapp
  • 49
  • 2
  • 5

2 Answers2

0

Strange question :p. Well it is possible to create a javascript framework that is able to manage everything. You just need an index.html that loads the first file, nothing else is necessary. There are no limits in javascript. To begin with, all you need is document.createElement, node.appendChild and node.removeChild. I dont know if this answer helps you because i dont really understand what the question here is.

OliverK
  • 146
  • 5
  • We have tried that but we are using 2 frameworks that basically do this, Kendo and Sencha and you cannot have these 2 frameworks mixed together. If we could save and restore the DOM when we switch between the usage of each framework that would ideal. Why we would do this is a long story, but it is a requirement of our client. – simapp Sep 19 '14 at 15:30
0

You could use jQuery.parseHTML() function to create a set of DOM elements which can at some point be inserted (or not) into the document. The parsed structure can be manipulated with jQuery or passed to other libraries for manipulation (although I am not sure how straightforward is this, depending on the other libraries you want to use...).

excentris
  • 471
  • 1
  • 7
  • 25