Re: Cloning popups/panels

Archaeopteryx <[email protected]> Thu, 15 May 2014 15:29:13 +0200
Newsgroups gmane.comp.mozilla.devel.xpfe
Message-ID <[email protected]>
-------- Original-Nachricht --------
Betreff: Cloning popups/panels
Von: [email protected]
Datum: 2014-05-10 22:19
 > The piece of software I'm designing requires having multiple
 > (ideally, an infinite number of) panels of the same kind open at the
 > same time.
 >
 > Every clone should behave like it was an individual element (i. e.
 > each of them can have it's own background colour and, whenever I
 > input text, it will only appear in this particular instance of the
 > panel) and I should be able to position them individually.
 >
 > Is this possible, somehow?
 >

You can do this by using DOMParser, see 
https://developer.mozilla.org/en-US/docs/Web/API/DOMParser , and then 
modify the new nodes accordingly.

An alternative is .cloneNode: 
https://developer.mozilla.org/en-US/docs/Web/API/Node.cloneNode