Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Thunderbird trunk - can't modify compFields from JavaScript

109 views
Skip to first unread message

Jonathan Kamens

unread,
Feb 16, 2015, 5:45:03 PM2/16/15
to
My Thunderbird add-on adds headers to the end of
gMsgCompose.compFields.otherRandomHeaders and sets
gMsgCompose.compFields.messageId. On a trunk build,
It's getting an error when attempting to do the former
(and I suspect it'd fail on the latter as well, but it
never gets that far):

NS_ERROR_XPC_CANT_MODIFY_PROP_ON_WN: Cannot modify properties of a WrappedNative

I guess something has changed to cause what my add-on
does no longer be valid. Can anyone offer any insight
into what I need to do instead to add headers to a
message and set its message ID?

Joshua Cranmer 🐧

unread,
Feb 16, 2015, 5:52:25 PM2/16/15
to
On 2/16/2015 4:21 PM, j...@jik2.kamens.brookline.ma.us (Jonathan Kamens)
wrote:
otherRandomHeaders no longer exists as of bug 998191 (TB 37). Instead,
you can use
gMsgCompose.compFields.setHeader("Foo", "bar"). Note that the structured
header approach also handles line folding and RFC 2047 encoding for you,
and you can also choose to represent your headers as non-string fields
(c.f. newsgroups in
<https://dxr.mozilla.org/comm-central/source/mailnews/mime/src/extraMimeParsers.jsm>).

--
Joshua Cranmer
Thunderbird and DXR developer
Source code archæologist

Jonathan Kamens

unread,
Feb 26, 2015, 7:45:03 AM2/26/15
to Joshua Cranmer 🐧, jik
Thanks, that did it.
0 new messages