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
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Sign in to report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
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
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Sign in to report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
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
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Sign in to report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message