XML Binding Change?

General discussion and chat (archived)
User avatar
RealityRipple
Astronaut
Astronaut
Posts: 644
Joined: 2018-05-17, 02:34
Location: Los Berros Canyon, California
Contact:

XML Binding Change?

Unread post by RealityRipple » 2019-05-03, 15:29

My extension "ExtExp" has stopped working in 28.5, apparently due to an error in the binding.xml file. The browser console says "missing ( before formal parameters" on line 20, column 9. Did something change to prevent the use of CDATA in binding methods? Do I need to wrap my code at a JS level? Did I miss something somewhere else that would trigger this error falsely? Is the location just pointing to all the cdata and it's actually a problem elsewhere? I'll be searching for the solution myself, but in case it's something known and obvious, I figured I'd ask first.

User avatar
Isengrim
Board Warrior
Board Warrior
Posts: 1325
Joined: 2015-09-08, 22:54
Location: 127.0.0.1
Contact:

Re: XML Binding Change?

Unread post by Isengrim » 2019-05-03, 15:48

I don't think anything would have changed with the way CDATA is parsed in XML or XBL. My guess is that something in the CDATA-wrapped code is the real source of the issue, but it's difficult to say for sure. I am also not an expert on bindings.
a.k.a. Ascrod
Linux Mint 19.3 Cinnamon (64-bit), Debian Bullseye (64-bit), Windows 7 (64-bit)
"As long as there is someone who will appreciate the work involved in the creation, the effort is time well spent." ~ Tetsuzou Kamadani, Cave Story

User avatar
JustOff
Banned user
Banned user
Posts: 2083
Joined: 2015-09-03, 19:47
Location: UA

Re: XML Binding Change?

Unread post by JustOff » 2019-05-03, 16:15

I see nothing wrong with your code, and I suspect that something went wrong after porting bug #296814 as part of Issue #816 (UXP). It's also likely that the error in pentadactyl has the same roots.

User avatar
RealityRipple
Astronaut
Astronaut
Posts: 644
Joined: 2018-05-17, 02:34
Location: Los Berros Canyon, California
Contact:

Re: XML Binding Change?

Unread post by RealityRipple » 2019-05-03, 16:16

Isengrim wrote:
2019-05-03, 15:48
I don't think anything would have changed with the way CDATA is parsed in XML or XBL. My guess is that something in the CDATA-wrapped code is the real source of the issue, but it's difficult to say for sure. I am also not an expert on bindings.
I literally got rid of everything, every scrap of JS, to the point it just has

Code: Select all

<?xml version="1.0"?>
<bindings id="extExpBindings"
          xmlns="http://www.mozilla.org/xbl"
          xmlns:xul="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
          xmlns:xbl="http://www.mozilla.org/xbl"
          xmlns:html="http://www.w3.org/1999/xhtml">
 <binding id="export-button">
  <implementation>
   <method name="export">
    <body></body>
   </method>
  </implementation>
 </binding>
</bindings>
and I still get the same error message, pointing at <body></body>. I noticed that there were changes to css's url() function? Maybe because binding is called with

Code: Select all

-moz-binding: url("chrome://extexp/content/binding.xml#legacy-export-button");
it's causing some unwanted behavior somehow? I honestly don't know.

New Tobin Paradigm

Re: XML Binding Change?

Unread post by New Tobin Paradigm » 2019-05-03, 18:38

What is the exact error you are getting from the Toolkit Error Console? Please but it in a code block.

User avatar
RealityRipple
Astronaut
Astronaut
Posts: 644
Joined: 2018-05-17, 02:34
Location: Los Berros Canyon, California
Contact:

Re: XML Binding Change?

Unread post by RealityRipple » 2019-05-03, 19:40

New Tobin Paradigm wrote:
2019-05-03, 18:38
What is the exact error you are getting from the Toolkit Error Console? Please but it in a code block.

Code: Select all

SyntaxError: missing ( before formal parameters  
binding.xml:20:9
That's literally it.

New Tobin Paradigm

Re: XML Binding Change?

Unread post by New Tobin Paradigm » 2019-05-03, 19:51

Funny, I am pretty sure I said Toolkit Error Console not devtools browser console.

This doesn't make sense though because if it were something we did wouldn't it bust dozens of internal bindings too?

User avatar
RealityRipple
Astronaut
Astronaut
Posts: 644
Joined: 2018-05-17, 02:34
Location: Los Berros Canyon, California
Contact:

Re: XML Binding Change?

Unread post by RealityRipple » 2019-05-03, 20:01

New Tobin Paradigm wrote:
2019-05-03, 19:51
Funny, I am pretty sure I said Toolkit Error Console not devtools browser console.

This doesn't make sense though because if it were something we did wouldn't it bust dozens of internal bindings too?
To what toolkit are you referring? I don't have anything other than what's built-in: DevTools and the legacy error console, which just shows the same message.


I thought the same thing. That's why I was wondering if it had something to do with the url() function in CSS or something... since the JS that creates the object should fail before the binding is even called if there's a problem with it... And it's all pretty simple code.

User avatar
JustOff
Banned user
Banned user
Posts: 2083
Joined: 2015-09-03, 19:47
Location: UA

Re: XML Binding Change?

Unread post by JustOff » 2019-05-03, 20:07

New Tobin Paradigm wrote:
2019-05-03, 19:51
This doesn't make sense though because if it were something we did wouldn't it bust dozens of internal bindings too?
I doubt that we have bindings that contain function definitions in CDATA.

PS: I tried to revert a9682a3 mentioned above and the error goes away.

User avatar
RealityRipple
Astronaut
Astronaut
Posts: 644
Joined: 2018-05-17, 02:34
Location: Los Berros Canyon, California
Contact:

Re: XML Binding Change?

Unread post by RealityRipple » 2019-05-03, 20:11

I figured it out, I think. Looks like the function "export" is reserved or already exists or is just not liked. I changed it to exportXPI and suddenly everything's acting like normal.

New Tobin Paradigm

Re: XML Binding Change?

Unread post by New Tobin Paradigm » 2019-05-03, 20:15

That makes sense.. export is a keyword in js now with the backporting of stuffs i suppose.
Last edited by New Tobin Paradigm on 2019-05-03, 20:21, edited 1 time in total.

User avatar
RealityRipple
Astronaut
Astronaut
Posts: 644
Joined: 2018-05-17, 02:34
Location: Los Berros Canyon, California
Contact:

Re: XML Binding Change?

Unread post by RealityRipple » 2019-05-03, 20:17

New Tobin Paradigm wrote:
2019-05-03, 20:15
That makes sense.. export is a keyword in js now with the backporting of stuffs.
Just another one of those things I really should have been less stingy with character counts over.

New Tobin Paradigm

Re: XML Binding Change?

Unread post by New Tobin Paradigm » 2019-05-03, 20:25

Perhaps so. Btw thanks for your continued support of UXP Applications and being the perfect example of the indexing option with your externals on the Add-ons Sites.

BTW if any of your externals support Basilisk or Interlink let Ryan aka Lootyhoof or FranklinDM know so they can enable the listings on Phoebus for supported Application's Add-ons Site.

User avatar
RealityRipple
Astronaut
Astronaut
Posts: 644
Joined: 2018-05-17, 02:34
Location: Los Berros Canyon, California
Contact:

Re: XML Binding Change?

Unread post by RealityRipple » 2019-05-03, 20:36

New Tobin Paradigm wrote:
2019-05-03, 20:25
Perhaps so. Btw thanks for your continued support of UXP Applications and being the perfect example of the indexing option with your externals on the Add-ons Sites.

BTW if any of your externals support Basilisk or Interlink let Ryan aka Lootyhoof or FranklinDM know so they can enable the listings on Phoebus for supported Application's Add-ons Site.
I'll have to check those... None of my users have mentioned them, although someone did post some vague statement about Waterfox, which made me think I'd better see how support is on various other offerings... Thanks for the heads-up.

New Tobin Paradigm

Re: XML Binding Change?

Unread post by New Tobin Paradigm » 2019-05-03, 20:56

Waterfox ESR68 will require one time use insanity to conform your extensions to what little Mozilla Technology is left and you can almost completely count XBL out of the equasion.

You might as well write webex versions if you are gonna bother with it and I wouldn't recommend it.

User avatar
RealityRipple
Astronaut
Astronaut
Posts: 644
Joined: 2018-05-17, 02:34
Location: Los Berros Canyon, California
Contact:

Re: XML Binding Change?

Unread post by RealityRipple » 2019-05-03, 21:44

New Tobin Paradigm wrote:
2019-05-03, 20:56
Waterfox ESR68 will require one time use insanity to conform your extensions to what little Mozilla Technology is left and you can almost completely count XBL out of the equasion.

You might as well write webex versions if you are gonna bother with it and I wouldn't recommend it.
O, I know WF is a lost cause. I meant like... Linux distro clones... Adblock Browser for Android... that sort of thing.

Locked