These are tested by at least 2 Mozilla testcases, and 1 KJS testcase..
Created attachment 5321 [details] patch
Created attachment 5322 [details] woops, fixed Made a mistake editting the diff before
Comment on attachment 5322 [details] woops, fixed Looks good. r=me
Ideally we'd land the KJS test case along with this.
Landed. If I understand correctly, we imported the KJS tests into fast/js/kde.