Coder Social home page Coder Social logo

Comments (19)

jobisoft avatar jobisoft commented on September 26, 2024 1

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.

from developer-docs.

jobisoft avatar jobisoft commented on September 26, 2024 1

https://developer.thunderbird.net/add-ons/updating/tb68/changes#removed-xbl-bindings

from developer-docs.

jobisoft avatar jobisoft commented on September 26, 2024

That is part of the XBL removal which was done in TB68. This is currently above my head. What did you use it for?

from developer-docs.

eyalroz avatar eyalroz commented on September 26, 2024

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.

from developer-docs.

jobisoft avatar jobisoft commented on September 26, 2024

This document which is linked in the TB68 guide has some info about this:
https://wiki.mozilla.org/Thunderbird/de-xbl

Is that sufficient?

from developer-docs.

eyalroz avatar eyalroz commented on September 26, 2024

@jobisoft :
No, because :

  1. extension authors don't use that method only for their own XBL elements. They may think of it as merely another DOM search utility.
  2. Because this removal is a 68->78 change.
  3. Because, glancing at that document, it's not at all clear that this is a change to notice. The TB 68->78 changes page has a nice header with each removed API.

from developer-docs.

jobisoft avatar jobisoft commented on September 26, 2024

It was part of this piece of code

Which code? Can you link?

from developer-docs.

jobisoft avatar jobisoft commented on September 26, 2024

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.

from developer-docs.

eyalroz avatar eyalroz commented on September 26, 2024

@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.

from developer-docs.

jobisoft avatar jobisoft commented on September 26, 2024

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?

from developer-docs.

eyalroz avatar eyalroz commented on September 26, 2024

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().

from developer-docs.

jobisoft avatar jobisoft commented on September 26, 2024

https://developer.thunderbird.net/add-ons/updating/tb78/changes#getanonymouselementbyattribute-and-getanonymousnodes-have-been-removed

I do not think there is more to say, is there?

from developer-docs.

eyalroz avatar eyalroz commented on September 26, 2024

I do not think there is more to say, is there?

Well:

  1. If this stopped working in TB 68, perhaps there needs to be a note about these in the TB 68 document.
  2. The links you added are to the German version of the documentation.

from developer-docs.

jobisoft avatar jobisoft commented on September 26, 2024
  1. 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

  2. Thanks! That happens way to often. Fixed.

from developer-docs.

eyalroz avatar eyalroz commented on September 26, 2024
  1. 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.)

from developer-docs.

mkmelin avatar mkmelin commented on September 26, 2024

Maybe it's not apparent, but the whole concept of anonymous content is (was) XBL only.

from developer-docs.

jobisoft avatar jobisoft commented on September 26, 2024

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 ...

from developer-docs.

eyalroz avatar eyalroz commented on September 26, 2024

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.

from developer-docs.

eyalroz avatar eyalroz commented on September 26, 2024

I can live with that.

from developer-docs.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.