Closed Bug 276444 Opened 20 years ago Closed 20 years ago

xbl:inherits should have feedback

Categories

(Core :: XBL, enhancement)

x86
Windows 2000
enhancement
Not set
normal

Tracking

()

RESOLVED INVALID

People

(Reporter: surkov, Assigned: hyatt)

Details

User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.8a5) Gecko/20041122
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.8a5) Gecko/20041122

I set on anonymous node 'xbl:inherits' attribute. Attribute value of anonymous
node is changed when corresponding attribute of binding is changed. I think it's
needed to realize 'inherits' attribute feedback. In other words when I change
attribute value of anonymous node then attribute value of binding should be
changed also.

This feature helps to keep attribute value of binding in correct state.

Reproducible: Always

Steps to Reproduce:
In instance html:input inherits 'value' attribute from textbox binding. When I
type text into html:input then 'value' attribute is changed but 'value'
attribute of textbox isn't changed. Therefore when I try
textbox.getAttribute('value') then I get wrong value of textbox attribute.
(In reply to comment #1)
> When I type text into html:input then 'value' attribute is changed 
That's not true. The DOM HTML .value attribute is not the same as the HTML
attribute 'value' in HTML. When you type text in an html textbox, the dom .value
is changed, but not the html attribute "value". This is not a bug, this is by
design (and is actually according to the specs.
Ok. I agree my previous example is not correct.

You can try checkbox instead of html:input.

//test.xml
<binding id="binding1">
<content>
	<xul:checkbox xbl:inherits="checked"/>
</content>
</binding>

//test.xul
<checkbox/>
<button label="test1"
oncommand="alert(this.previousSibling.getAttribute('checked'))"/>

<binding1/>
<button label="test2"
oncommand="alert(this.previousSibling.getAttribute('checked'))"/>

Attribute 'checked' of checkbox will be changed but attribute 'checked' of
binding1 will not be changed after clicks on checkboxes. This example shows what
I suppose.
This is invalid.  Multiple child nodes can inherit a value from the binding, and
may want to change it independently of each other (and of the binding).
Status: UNCONFIRMED → RESOLVED
Closed: 20 years ago
Resolution: --- → INVALID
You're right: maybe sometimes xbl:inherits without feedback is useful. But
sometimes such possibility is needed. When I should provide such feedback myself
then I should write routine code. If such feature will be presented then it will
save much time of developer. How do you think is it needed to add new attribute
(xbl:feedbackinherits) or something else?
I'd bring that up in the relevant newsgroup...
Please give me newsgroup url to watch the discussion.
netscape.public.mozilla.xbl newsgroup (news.mozilla.org server).
You need to log in before you can comment on or make changes to this bug.