home *** CD-ROM | disk | FTP | other *** search
- XB.UI.Behaviour.Image = XB.UI.Behaviour.extend({
- name: "image",
- nodeName: "image",
-
- constructor: function(comment, element, widgetInstanceId, builder) {
- this.base(comment, element, widgetInstanceId, builder);
- },
-
- build: function() {
- this.buildFake();
- this.on(this.fake, "DOMSubtreeModified", this.onModified, false, this);
- },
- onModified: function() {
- var path = this.fake.textContent;
- this.node.setAttribute("src", this.builder.resolveURI(path, this.widgetInstanceId));
- }
- });