Closed Bug 707745 Opened 13 years ago Closed 13 years ago

Documentation for self.data.url misstates return type

Categories

(Add-on SDK Graveyard :: Documentation, defect, P3)

defect

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: mhanson, Assigned: erikvvold)

References

Details

Attachments

(2 files)

The self.data.URL method claims to return a URL instance.  As of 12-5-11 it is returning a String.
OS: Mac OS X → All
Hardware: x86 → All
Assignee: nobody → erikvvold
I'm taking a look at how many tests break when self.data.URL returns a URL instance, if it seems bad then we should probably just change the docs.
Status: NEW → ASSIGNED
Depends on: 708168
Priority: -- → P3
Pointer to Github pull-request
Attachment #581864 - Flags: review?(rFobic)
In fact I think it makes more sense to change docs anyway. I know some people pass it through the message to the content which works just fine for strings. What do you think myk ?
(In reply to Irakli Gozilalishvili [:irakli] [:gozala] from comment #3)
> I know some
> people pass it through the message to the content which works just fine for
> strings.

What example wonn't work after bug 708168?
(In reply to Erik Vold from comment #4)
> (In reply to Irakli Gozilalishvili [:irakli] [:gozala] from comment #3)
> > I know some
> > people pass it through the message to the content which works just fine for
> > strings.
> 
> What example wonn't work after bug 708168?

There should be a test for it.
(In reply to Erik Vold from comment #4)
> (In reply to Irakli Gozilalishvili [:irakli] [:gozala] from comment #3)
> > I know some
> > people pass it through the message to the content which works just fine for
> > strings.
> 
> What example wonn't work after bug 708168?

ah I think I know what you meant now, JSON.stringify() will treat a URL differently than a string.. So, I agree with you now.

I'll make a new patch to just change the docs, and include a JSON.stringify test of URL, even though testing Object.keys in combo with other tests are doing basically the same thing..
(In reply to Erik Vold from comment #5)
> (In reply to Erik Vold from comment #4)
> > (In reply to Irakli Gozilalishvili [:irakli] [:gozala] from comment #3)
> > > I know some
> > > people pass it through the message to the content which works just fine for
> > > strings.
> > 
> > What example wonn't work after bug 708168?
> 
> There should be a test for it.

I guess this was the test that the output is a string, which I changed =]
Pointer to Github pull-request
Attachment #582014 - Flags: review?(rFobic)
Attachment #581864 - Flags: review?(rFobic)
Commit pushed to https://github.com/mozilla/addon-sdk

https://github.com/mozilla/addon-sdk/commit/cbe2870f560d77f404b6b7bbd70f6d758259b894
Merge pull request #304 from erikvold/bug-707745c

fix Bug 707745 minor correction to docs of self module r=@gozala
Status: ASSIGNED → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
Attachment #582014 - Flags: review?(rFobic) → review+
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: