DocumentFragment and XBL bindings

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

DocumentFragment and XBL bindings

daniel-435
Hello everyone,

I try to speed up some dynamic creation of UI elements in my XUL
application using DocumentFragments [1].

Unfortunately I cannot access methods which were added to XUL elements
via XBL bindings when these elements are attached to a fragment.

Example:

let fragment = document.createDocumentFragment();
let menu = document.createElement('menulist');
fragment.appendChild(menu);
menu.appendItem(...) // appendItem cannot be found

Is this a natural limitation of fragments and/or is there a way to work
around this problem? Did anyone had similiar problems?

Thanks & Regards,

Daniel

[1] https://developer.mozilla.org/en/DOM/document.createDocumentFragment
_______________________________________________
dev-tech-xul mailing list
[hidden email]
https://lists.mozilla.org/listinfo/dev-tech-xul
Reply | Threaded
Open this post in threaded view
|

Re: DocumentFragment and XBL bindings

Neil-4
daniel wrote:

> Is this a natural limitation of fragments

I believe this is a natural limitation; XBL bindings are activated by
CSS styles and therefore only take effect once the element has been
added to the document.

--
Warning: May contain traces of nuts.
_______________________________________________
dev-tech-xul mailing list
[hidden email]
https://lists.mozilla.org/listinfo/dev-tech-xul