Quantcast

Cloning popups/panels

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Cloning popups/panels

warfan2007
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?
_______________________________________________
dev-tech-xul mailing list
[hidden email]
https://lists.mozilla.org/listinfo/dev-tech-xul
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Cloning popups/panels

Sebastian Hengst
-------- Original-Nachricht --------
Betreff: Cloning popups/panels
Von: [hidden email]
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
_______________________________________________
dev-tech-xul mailing list
[hidden email]
https://lists.mozilla.org/listinfo/dev-tech-xul
Loading...