%xformsDTD; ]> return { __proto__: this.ownerDocument. getAnonymousElementByAttribute(this, 'anonid', 'control'), set value(val) { this.firstChild.data = val ? val : ""; } }; return this.ownerDocument. getAnonymousElementByAttribute(this, "anonid", "control"); return { __proto__: this.ownerDocument. getAnonymousElementByAttribute(this, "anonid", "control"), set value(val) { // We have to use a timeout since set value can be hit during the // output's constructor. There are always potential problems // changing the DOM during the constructor. For example, if we // don't use a timeout then setting the img's @src won't work on // FF 1.5 or FF 2. So we'll wait a tick before changing it here. setTimeout(function(img, val) {img.src = val;}, 0, this, val); } }; return { __proto__: this.ownerDocument. getAnonymousElementByAttribute(this, "anonid", "control"), set value(val) { // We have to use a timeout since set value can be hit during the // output's constructor. There are always potential problems // changing the DOM during the constructor. For example, if we // don't use a timeout then setting the img's @src won't work on // FF 1.5 or FF 2. So we'll wait a tick before changing it here. setTimeout(function(img, val) {img.src = "data:[image/*][;base64]," + val;}, 0, this, val); } }; return { _implicitContent: this.ownerDocument. getAnonymousElementByAttribute(this, "anonid", 'implicitcontent'), _explicitContent: this.ownerDocument. getAnonymousElementByAttribute(this, 'anonid', 'explicitcontent'), __proto__: this, set value(val) { if (val != null) { this._explicitContent.style.display = 'none'; this._implicitContent.style.removeProperty('display'); this._implicitContent.textContent = val; } else { this._explicitContent.style.removeProperty('display'); this._implicitContent.style.display = 'none'; this._implicitContent.textContent = ''; } }, get textValue() { if (this._explicitContent.style.display == 'none') return this._implicitContent.textContent; return this.textContent; }, get nodeValue() { var fragment = this.ownerDocument.createDocumentFragment(); var container = null; if (this._explicitContent.style.display == 'none') container = this._implicitContent; else container = this; for (var node = container.firstChild; node; node = node.nextSibling) { fragment.appendChild(node.cloneNode(true)); } return fragment; } }; return { __proto__: this.ownerDocument. getAnonymousElementByAttribute(this, 'anonid', 'control'), set disabled(val) { if (val) { this.setAttribute('disabled', 'disabled'); } else { this.removeAttribute('disabled'); } }, activate: function triggerControlElmActivate() { this.focus(); this.click(); } }; if (event.originalTarget == this.control) { this.dispatchDOMUIEvent("DOMFocusIn"); } if (event.originalTarget == this.control) { this.dispatchDOMUIEvent("DOMFocusOut"); } return { __proto__: this.ownerDocument. getAnonymousElementByAttribute(this, 'anonid', 'control'), trigger: this, set disabled(val) { this.isDisabled = val; }, activate: function triggerControlElmActivate(aNoFocus) { if (!this.isDisabled) { if (!aNoFocus) this.trigger.focus(); this.trigger.dispatchDOMUIEvent("DOMActivate"); } }, isDisabled: false }; if (event.originalTarget == this.control) { this.dispatchDOMUIEvent("DOMFocusIn"); } if (event.originalTarget == this.control) { this.dispatchDOMUIEvent("DOMFocusOut"); } return { __proto__: this.ownerDocument. getAnonymousElementByAttribute(this, 'anonid', 'container'), set selected(val) { this.style.display = val ? "inherit" : "none"; } }; return { inlineData: this.ownerDocument. getAnonymousElementByAttribute(this, "anonid", "inlineData"), bindingData: this.ownerDocument. getAnonymousElementByAttribute(this, "anonid", "bindingData"), container: this.ownerDocument. getAnonymousElementByAttribute(this, "anonid", "container"), setValue: function setValue(aUseInlineValue, aValue) { if (aUseInlineValue) { this.bindingData.style.display = "none"; this.inlineData.style.display = "inherit"; } else { this.bindingData.textContent = aValue; this.inlineData.style.display = "none"; this.bindingData.style.display = "inherit"; } } }; this.control.container.style.visibility = "visible"; this.control.container.style.display = "inherit"; this.control.container.style.left = aPosX + "px"; this.control.container.style.top = aPosY + "px"; this.control.container.style.left = "0px"; this.control.container.style.top = "0px"; this.control.container.style.visibility = "hidden"; this.control.container.style.display = "none"; // xforms:message[level="ephemeral"] element should fire accessibility // alert event when it appears, so we add role='wairole:alert' // attribute. this.control.container.setAttribute("role", "wairole:alert"); &xforms.upload.browsetext; &xforms.upload.cleartext; return { get value() { return this._textControl.value; }, set value(val) { this._textControl.value = val; }, set readonly(val) { if (val) { this._browseButton.setAttribute('disabled', 'disabled'); this._clearButton.setAttribute('disabled', 'disabled'); } else { this._browseButton.removeAttribute('disabled'); this._clearButton.removeAttribute('disabled'); } }, focus: function() { this._browseButton.focus(); }, activate: function uploadControlElmActivate() { this._browseButton.focus(); this._upload.uploadElement.pickFile(); }, _browseButton: this.ownerDocument. getAnonymousElementByAttribute(this, 'anonid', 'browse_button'), _clearButton: this.ownerDocument. getAnonymousElementByAttribute(this, 'anonid', 'clear_button'), _textControl: this.ownerDocument. getAnonymousElementByAttribute(this, 'anonid', 'text_control'), _upload: this }; switch (event.originalTarget.getAttribute("anonid")) { case "browse_button": this.uploadElement.pickFile(); break; case "clear_button": this.uploadElement.clearFile(); break; } switch (event.originalTarget.getAttribute("anonid")) { case "browse_button": case "clear_button": this.dispatchDOMUIEvent('DOMActivate'); break; } &xforms.upload.browsetext; &xforms.upload.cleartext;