<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
<p>It's just JavaScript, so whatever you normally use to make it
available. Or even put it there in the same file. <br>
</p>
<p>However, usually what you want to do is to use
customElements.define("launch-picker", MozLaunchPicker); after the
definition. Then you can use <launch-picker> in markup. Or
create it in JavaScript through
document.createElement("launch-picker"). Or get the class by
customElements.get("launch-picker");</p>
<p> -Magnus<br>
</p>
<div class="moz-cite-prefix">On 23-09-2019 14:29, Axel Grude wrote:<br>
</div>
<blockquote type="cite"
cite="mid:69ec11cb-cd02-207d-550f-194fe4b70a92@gmail.com">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<div id="smartTemplate4-template">
<p>Dear Magnus,</p>
<p>just tried the converter - good work!</p>
<p>If I have a new class implementation extending an action
target, such as:<br>
</p>
<pre>class MozLaunchPicker extends MozRuleactiontargetBase {
(implementation)
}
</pre>
<p>(How) can I connect/export that to my global object. Let's
say I have a global object FiltaQuilla in the main Add-on
scope. I want to import it as a sub-object wx (<b>W</b>ebe<b>X</b>tension)
like this:<br>
</p>
<pre>var {FiltaQuilla_wx} = Components.utils.import(<a class="moz-txt-link-rfc2396E" href="chrome://filtaquilla/content/filtaquilla-wx.js" moz-do-not-send="true">"chrome://filtaquilla/content/filtaquilla-wx.js"</a>);
FiltaQuilla<b>.wx</b> = FiltaQuilla_wx;
</pre>
<p>Can I just "attach" the classes like this?</p>
<pre>var EXPORTED_SYMBOLS = ['FiltaQuilla_wx'];
var FiltaQuilla_wx = {};
// Wrapped in a block to prevent leaking to window scope.
{
class MozLaunchPicker extends MozRuleactiontargetBase {
(implementation)
}
FiltaQuilla.wx.launchPicker = MozLaunchPicker;
}
</pre>
<p>thanks in advance!<br>
</p>
<p>Axel<br>
</p>
<style type="text/css">
.myName {
text-shadow: 1px 1px 2px #DDD;
transition:font-size 0.5s;
}
.myName:hover, .myName a:hover
{ font-size:13pt; text-shadow: 3px 3px 4px rgba(200,250,200,0.7);}
.moz-signature {opacity: 1.0 !important;}
.myName a { cursor: pointer !important; transition:font-size 0.5s;}
.myLogo {
transition: all .4s ease-out;
}
.myLogo:hover {
transform: scale(3) translate(-30px,-5px);
}
#mySignature, :not(blockquote) #mySignature {
background: rgb(230,240,163);
background-image: linear-gradient(to bottom, rgba(230,240,163,1) 0%,rgba(210,230,56,1) 50%,rgba(195,216,37,1) 51%,rgba(219,240,67,1) 100%);
color: #444;
box-shadow: 4px 4px 9px -2px rgba(0,0,0,0.65);
border-radius: 0.7em; padding: 0.8em 1.2em;
border: 1px dashed #8080A0;
font-size: 11pt !important;
font-family: 'Lucida Sans Unicode', 'Lucida Grande', sans-serif;
width: 65%;
}
.AddonList a {
color: #666666;
font-size: 10pt !important;
}
</style>
<div id="mySignature"> <b class="myName"><a
href="mailto:axel.grude@gmail.com" moz-do-not-send="true">Axel
Grude</a></b> <br>
Music Production and Composition <br>
Thunderbird Add-ons Developer <span class="AddonList">(<a
href="https://addons.thunderbird.net/thunderbird/addon/quickfolders-tabbed-folders/"
moz-do-not-send="true">QuickFolders</a>, <a
href="https://addons.thunderbird.net/thunderbird/addon/quickfilters/"
moz-do-not-send="true">quickFilters</a>, <a
href="https://addons.mozilla.org/firefox/addon/quickpasswords/"
moz-do-not-send="true">QuickPasswords</a>, <a
href="https://addons.thunderbird.net/thunderbird/addon/zombie-keys/"
moz-do-not-send="true">Zombie Keys</a>, <a
href="https://addons.thunderbird.net/thunderbird/addon/smarttemplate4/"
moz-do-not-send="true">SmartTemplate⁴</a>)</span> <br>
Visit my <a href="https://www.youtube.com/c/thunderbirddaily"
moz-do-not-send="true">YouTube Channel</a> for email
productivity tips <img style="margin-top: 1em; float: right;
box-shadow: 1px 1px 2px rgba(20, 20, 20, 0.4);"
moz-do-not-send="false" class="myLogo"
src="cid:part9.5E884995.BE8D040B@iki.fi" alt="Get
Thunderbird!" width="94" height="15"> </div>
</div>
<div id="smartTemplate4-quoteHeader">
<style type="text/css" scoped="">
#newHeaderAG1 b { font-weight:bold; color: #990033; min-width: 4.5em; max-width:none; display:inline-block;}
</style>
<blockquote type="cite" style="margin-bottom: -20px !important;
padding-bottom:20px !important;">
<div id="newHeaderAG1" style="font-size: x-small; padding:1em;
background-color:rgba(220,220,240,0.4); border-radius:3px;">
<b>Subject:</b>Re: Thunderbird de-xbl effort finished!<br>
<b>From:</b>Magnus Melin <a class="moz-txt-link-rfc2396E"
href="mailto:mkmelin+mozilla@iki.fi"
moz-do-not-send="true"><mkmelin+mozilla@iki.fi></a><br>
<b>To:</b><a class="moz-txt-link-rfc2396E"
href="mailto:tb-planning@mozilla.org"
moz-do-not-send="true"><tb-planning@mozilla.org></a>
<br>
<b>Sent: </b>Thursday, 9/19/2019, 19:10 19:10 IST +0100
[Week 38]<br>
</div>
</blockquote>
</div>
<blockquote type="cite"
cite="mid:15057a6d-1c72-9919-024a-8404e41de2ce@iki.fi">
<p>For things like that, start out with doing an automatic
conversion using <a class="moz-txt-link-freetext"
href="https://bgrins.github.io/xbl-analysis/converter/"
moz-do-not-send="true">https://bgrins.github.io/xbl-analysis/converter/</a></p>
<p>This will get you maybe 80% of the way. Then you need to do
code adjustments and have the Custom Element classes extend
whatever equivalent Custom Element class replaced the parent
binding (if any). <br>
</p>
<p> -Magnus<br>
</p>
<div class="moz-cite-prefix">On 19-09-2019 15:39, Axel Grude
wrote:<br>
</div>
<blockquote type="cite"
cite="mid:637c131d-9884-e504-563d-cbca1cc6a1fa@gmail.com">
<div id="smartTemplate4-template">
<p>Dear Magnus,</p>
<p>well done to everyone involved!<br>
</p>
<p>Now it would be fantastic if somebody could assist in
migrating FiltaQuilla. This extension one has been heavily
affected by this move. I would see at it's core about 75%
of the code needs to be rewritten. I have seen a pattern
in Thunderbird that uses the function
MozXULElement.parseXULToFragment in order to overload /
inject xml, but I am not very sure what is happening at
all, and whether this is "ninja style" programming or the
official way of replacing xbl in order to create
(sometimes customized) controls in the filter conditions /
actions dropdowns.</p>
<p>If anyone is interested in helping, I made a new source
tree at:</p>
<p><a class="moz-txt-link-freetext"
href="https://github.com/RealRaven2000/FiltaQuilla/tree/thunderbird68"
moz-do-not-send="true">https://github.com/RealRaven2000/FiltaQuilla/tree/thunderbird68</a></p>
<p>the basic idea is removing
<svg class="octicon octicon-file" viewBox="0 0 12 16"
width="12" height="16"><path fill-rule="evenodd" d="M6
5H2V4h4v1zM2 8h7V7H2v1zm0 2h7V9H2v1zm0
2h7v-1H2v1zm10-7.5V14c0 .55-.45 1-1 1H1c-.55
0-1-.45-1-1V2c0-.55.45-1 1-1h7.5L12 4.5zM11 5L8
2H1v12h10V5z"></path></svg> <span class="css-truncate
css-truncate-target"><a class="js-navigation-open"
title="bindings.xml"
id="6ad19b1abd9bb500434a76c7b249fe8c-610999c90d6dbd13e8331eed707eea5b0f009745"
href="https://github.com/RealRaven2000/FiltaQuilla/blob/thunderbird68/content/bindings.xml"
moz-do-not-send="true">bindings.xml</a></span></p>
<p>and put the xml code into <span class="css-truncate
css-truncate-target"><a class="js-navigation-open"
title="filtaquilla-wx.js"
id="c5fb296e6dfb26135a36cd3017a5ddf5-f139b2bf03a7664ee13a8784266da7d9e9c569a9"
href="https://github.com/RealRaven2000/FiltaQuilla/blob/thunderbird68/content/filtaquilla-wx.js"
moz-do-not-send="true">filtaquilla-wx.js</a> instead.<br>
</span></p>
<p>thanks,<br>
Axel<br>
</p>
<style type="text/css">
.myName {
text-shadow: 1px 1px 2px #DDD;
transition:font-size 0.5s;
}
.myName:hover, .myName a:hover
{ font-size:13pt; text-shadow: 3px 3px 4px rgba(200,250,200,0.7);}
.moz-signature {opacity: 1.0 !important;}
.myName a { cursor: pointer !important; transition:font-size 0.5s;}
.myLogo {
transition: all .4s ease-out;
}
.myLogo:hover {
transform: scale(3) translate(-30px,-5px);
}
#mySignature, :not(blockquote) #mySignature {
background: rgb(230,240,163);
background-image: linear-gradient(to bottom, rgba(230,240,163,1) 0%,rgba(210,230,56,1) 50%,rgba(195,216,37,1) 51%,rgba(219,240,67,1) 100%);
color: #444;
box-shadow: 4px 4px 9px -2px rgba(0,0,0,0.65);
border-radius: 0.7em; padding: 0.8em 1.2em;
border: 1px dashed #8080A0;
font-size: 11pt !important;
font-family: 'Lucida Sans Unicode', 'Lucida Grande', sans-serif;
width: 65%;
}
.AddonList a {
color: #666666;
font-size: 10pt !important;
}
</style>
<div id="mySignature"> <b class="myName"><a
href="mailto:axel.grude@gmail.com"
moz-do-not-send="true">Axel Grude</a></b> <br>
Music Production and Composition <br>
Thunderbird Add-ons Developer <span class="AddonList">(<a
href="https://addons.thunderbird.net/thunderbird/addon/quickfolders-tabbed-folders/"
moz-do-not-send="true">QuickFolders</a>, <a
href="https://addons.thunderbird.net/thunderbird/addon/quickfilters/"
moz-do-not-send="true">quickFilters</a>, <a
href="https://addons.mozilla.org/firefox/addon/quickpasswords/"
moz-do-not-send="true">QuickPasswords</a>, <a
href="https://addons.thunderbird.net/thunderbird/addon/zombie-keys/"
moz-do-not-send="true">Zombie Keys</a>, <a
href="https://addons.thunderbird.net/thunderbird/addon/smarttemplate4/"
moz-do-not-send="true">SmartTemplate⁴</a>)</span> <br>
Visit my <a
href="https://www.youtube.com/c/thunderbirddaily"
moz-do-not-send="true">YouTube Channel</a> for email
productivity tips <img style="margin-top: 1em; float:
right; box-shadow: 1px 1px 2px rgba(20, 20, 20, 0.4);"
moz-do-not-send="false" class="myLogo"
src="cid:part9.5E884995.BE8D040B@iki.fi" alt="Get
Thunderbird!" width="94" height="15"> </div>
</div>
<div id="smartTemplate4-quoteHeader">
<style type="text/css" scoped="">
#newHeaderAG1 b { font-weight:bold; color: #990033; min-width: 4.5em; max-width:none; display:inline-block;}
</style>
<blockquote type="cite" style="margin-bottom: -20px
!important; padding-bottom:20px !important;">
<div id="newHeaderAG1" style="font-size: x-small;
padding:1em; background-color:rgba(220,220,240,0.4);
border-radius:3px;"> <b>Subject:</b>Thunderbird de-xbl
effort finished!<br>
<b>From:</b>Magnus Melin <a
class="moz-txt-link-rfc2396E"
href="mailto:mkmelin+mozilla@iki.fi"
moz-do-not-send="true"><mkmelin+mozilla@iki.fi></a><br>
<b>To:</b>Thunderbird Planning <a
class="moz-txt-link-rfc2396E"
href="mailto:tb-planning@mozilla.org"
moz-do-not-send="true"><tb-planning@mozilla.org></a>
<br>
<b>Sent: </b>Thursday, 9/19/2019, 10:04 10:04 GMT DT
+0100 [Week 38]<br>
</div>
</blockquote>
</div>
<blockquote type="cite"
cite="mid:04a0572b-b0ea-65bc-4a9e-65b39beb0ff3@iki.fi"
id="mid_04a0572b_b0ea_65bc_4a9e_65b39beb0ff3_iki_fi" class="
cite">
<p>As you may know, for the past year the Thunderbird team
has put a lot of work into migrating away from the Mozilla
proprietary XBL technology, and as of today, I'm happy to
announce we're now XBL free!<br>
</p>
<p>Thanks, and congrats to everybody who participated in
this effort! Especially Khushil Mistry, Paul Morris, and
Alessandro Castellani each converted many bindings. Also a
big thanks to the mozilla-central de-XBL team whose
background work made this possible.<br>
</p>
<img moz-do-not-send="false"
src="cid:part26.885373EC.019436E6@iki.fi" title="Number of
XBL bindings during Thunderbird de-XBL" alt="XBL over
time" class="" width="605" height="340">
<p> -Magnus<br>
</p>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<pre class="moz-quote-pre" wrap="">_______________________________________________
tb-planning mailing list
<a class="moz-txt-link-abbreviated" href="mailto:tb-planning@mozilla.org" moz-do-not-send="true">tb-planning@mozilla.org</a>
<a class="moz-txt-link-freetext" href="https://mail.mozilla.org/listinfo/tb-planning" moz-do-not-send="true">https://mail.mozilla.org/listinfo/tb-planning</a>
</pre>
</blockquote>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<pre class="moz-quote-pre" wrap="">_______________________________________________
tb-planning mailing list
<a class="moz-txt-link-abbreviated" href="mailto:tb-planning@mozilla.org" moz-do-not-send="true">tb-planning@mozilla.org</a>
<a class="moz-txt-link-freetext" href="https://mail.mozilla.org/listinfo/tb-planning" moz-do-not-send="true">https://mail.mozilla.org/listinfo/tb-planning</a>
</pre>
</blockquote>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<pre class="moz-quote-pre" wrap="">_______________________________________________
tb-planning mailing list
<a class="moz-txt-link-abbreviated" href="mailto:tb-planning@mozilla.org" moz-do-not-send="true">tb-planning@mozilla.org</a>
<a class="moz-txt-link-freetext" href="https://mail.mozilla.org/listinfo/tb-planning" moz-do-not-send="true">https://mail.mozilla.org/listinfo/tb-planning</a>
</pre>
</blockquote>
</blockquote>
</body>
</html>