Closed eyalroz closed 4 years ago
That is part of the XBL removal which was done in TB68. This is currently above my head. What did you use it for?
It was part of this piece of code which tried several ways of getting the message subject, each of which worked with different versions of TB or SM. The removal happened in TB 72 according to the bug page.
This document which is linked in the TB68 guide has some info about this: https://wiki.mozilla.org/Thunderbird/de-xbl
Is that sufficient?
@jobisoft : No, because :
It was part of this piece of code
Which code? Can you link?
I am not saying you are wrong. But it appears the removed function in TB72 was already "dead code" (always returned null pointer) so the functionality stopped long ago. With TB72 it would throw now that an unknown function has been used.
This is obviously a function related to XBL.
@jobisoft : this. It was already failing in what it was trying to do in v68, but it didn't throw an exception. Also, it was necessary/useful in earlier versions.
For the last few years, what really needs to be used is
displayedMessageSubject = document.getElementById('expandedsubjectBox').textContent;
but for multi-version-support, one needs both the exists code and this line as yet another alternative.
So my assumption is true :-)
Woohoo: A lot of add-ons are still using that: https://github.com/search?q=getAnonymousElementByAttribute++path:/xall/x68+repo%3Acleidigh%2FThunderKdB&type=Code
So what did you use it for? Why not just use getElementById or something?
So what did you use it for? Why not just use getElementById or something?
The field with the text used to be an anonymous element within the XBL subject box. So, I couldn't get it byId().
I do not think there is more to say, is there?
I do not think there is more to say, is there?
Well:
I think it is, isn't it? There is a section about Removed XBL bindings and there is a linked document which includes the removal/replacement of getAnonymousElementByAttribute
Thanks! That happens way to often. Fixed.
- I think it is, isn't it? There is a section about Removed XBL bindings and there is a linked document which includes the removal/replacement of getAnonymousElementByAttribute
Well, not effectively. I mean, there is nothing inherently XBL'ish about a method named getAnonymousElementByAttribute()
. When I was updating my extensions for TB 68 it didn't occur to me that to follow that link, since I as far as I was concerned, I wasn't using any XBL. (And I didn't get the error because it was being masked by something else.)
Maybe it's not apparent, but the whole concept of anonymous content is (was) XBL only.
Hm, the very first google search result of "MDN getAnonymousElementByAttribute()" returns:
https://developer.mozilla.org/en-US/docs/Archive/Mozilla/XBL/XBL_1.0_Reference/DOM_Interfaces
which tells you this method belongs to the XBL stuff. I hesitate to duplicate the information ...
I hesitate to duplicate the information ...
There's no problem with a bit of duplication between the 78-changes page and other pages which describe these changes in a different context. But it's your call I guess.
@mkmelin : I understand this now, but it's not obvious from the method name. I had originally copy-pasted some code which used getAnonymousElementByAttribute()
, and with the passage of time had not remembered that code may have had something to do with XBL.
We are talking about duplication inside the TB68 add-on guide. I did add the info to the TB78 guide, as it throws errors now.
Let me sleep over this. I probably extend the info box in the TB68 guide.
I can live with that.
An important API function removed over the past year is
document.getAnonymousElementByAttribute()
.See: https://bugzilla.mozilla.org/show_bug.cgi?id=1591145
The TB 68->78 changes pages should discuss this and suggest an alternative.