Page 1 of 1

XML Binding Change?

Posted: 2019-05-03, 15:29
by RealityRipple
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.

Re: XML Binding Change?

Posted: 2019-05-03, 15:48
by Isengrim
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.

Re: XML Binding Change?

Posted: 2019-05-03, 16:15
by JustOff
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.

Re: XML Binding Change?

Posted: 2019-05-03, 16:16
by RealityRipple
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.

Re: XML Binding Change?

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

Re: XML Binding Change?

Posted: 2019-05-03, 19:40
by RealityRipple
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.

Re: XML Binding Change?

Posted: 2019-05-03, 19:51
by New Tobin Paradigm
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?

Re: XML Binding Change?

Posted: 2019-05-03, 20:01
by RealityRipple
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.

Re: XML Binding Change?

Posted: 2019-05-03, 20:07
by JustOff
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.

Re: XML Binding Change?

Posted: 2019-05-03, 20:11
by RealityRipple
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.

Re: XML Binding Change?

Posted: 2019-05-03, 20:15
by New Tobin Paradigm
That makes sense.. export is a keyword in js now with the backporting of stuffs i suppose.

Re: XML Binding Change?

Posted: 2019-05-03, 20:17
by RealityRipple
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.

Re: XML Binding Change?

Posted: 2019-05-03, 20:25
by New Tobin Paradigm
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.

Re: XML Binding Change?

Posted: 2019-05-03, 20:36
by RealityRipple
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.

Re: XML Binding Change?

Posted: 2019-05-03, 20:56
by New Tobin Paradigm
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.

Re: XML Binding Change?

Posted: 2019-05-03, 21:44
by RealityRipple
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.