Re: File() constructor with a string argument no longer works since Firefox 52a?

2016-11-22 Thread 段垚

I see. Thank you very much!


在 2016/11/23 15:24, Shih-Chiang Chien 写道:

use File.createFromFileName(path)
see https://dxr.mozilla.org/mozilla-central/source/dom/webidl/File.webidl#48

Best Regards,
Shih-Chiang Chien
Mozilla Taiwan

On Wed, Nov 23, 2016 at 3:18 PM, 段垚  wrote:


Thanks. So the chrome-only constructor was removed. Is there an
alternative way to create a File object from a path?



在 2016/11/23 14:04, Kris Maglione 写道:


See https://bugzil.la/1303518

On Wed, Nov 23, 2016 at 01:48:43PM +0800, 段垚 wrote:


Hi,

In Firefox 51 chrome code, this code works: `new File(path_to_file)` ,
if  `path_to_file` exists.

However in Firefox 52a (2016-11-22),an execption is thrown: "TypeError:
Not enough arguments to File".

I don't see a deprecation or removing note in the dev-doc[1], what's the
problem?

Thanks.


[1] https://developer.mozilla.org/en-US/docs/Extensions/Using_th
e_DOM_File_API_in_chrome_code


___
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform



___
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform


___
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform



___
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform


Re: File() constructor with a string argument no longer works since Firefox 52a?

2016-11-22 Thread Shih-Chiang Chien
use File.createFromFileName(path)
see https://dxr.mozilla.org/mozilla-central/source/dom/webidl/File.webidl#48

Best Regards,
Shih-Chiang Chien
Mozilla Taiwan

On Wed, Nov 23, 2016 at 3:18 PM, 段垚  wrote:

> Thanks. So the chrome-only constructor was removed. Is there an
> alternative way to create a File object from a path?
>
>
>
> 在 2016/11/23 14:04, Kris Maglione 写道:
>
>> See https://bugzil.la/1303518
>>
>> On Wed, Nov 23, 2016 at 01:48:43PM +0800, 段垚 wrote:
>>
>>> Hi,
>>>
>>> In Firefox 51 chrome code, this code works: `new File(path_to_file)` ,
>>> if  `path_to_file` exists.
>>>
>>> However in Firefox 52a (2016-11-22),an execption is thrown: "TypeError:
>>> Not enough arguments to File".
>>>
>>> I don't see a deprecation or removing note in the dev-doc[1], what's the
>>> problem?
>>>
>>> Thanks.
>>>
>>>
>>> [1] https://developer.mozilla.org/en-US/docs/Extensions/Using_th
>>> e_DOM_File_API_in_chrome_code
>>>
>> ___
>> dev-platform mailing list
>> dev-platform@lists.mozilla.org
>> https://lists.mozilla.org/listinfo/dev-platform
>>
>
>
> ___
> dev-platform mailing list
> dev-platform@lists.mozilla.org
> https://lists.mozilla.org/listinfo/dev-platform
>
___
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform


Re: File() constructor with a string argument no longer works since Firefox 52a?

2016-11-22 Thread 段垚
Thanks. So the chrome-only constructor was removed. Is there an 
alternative way to create a File object from a path?



在 2016/11/23 14:04, Kris Maglione 写道:

See https://bugzil.la/1303518

On Wed, Nov 23, 2016 at 01:48:43PM +0800, 段垚 wrote:

Hi,

In Firefox 51 chrome code, this code works: `new File(path_to_file)` 
, if  `path_to_file` exists.


However in Firefox 52a (2016-11-22),an execption is thrown: 
"TypeError: Not enough arguments to File".


I don't see a deprecation or removing note in the dev-doc[1], what's 
the problem?


Thanks.


[1] 
https://developer.mozilla.org/en-US/docs/Extensions/Using_the_DOM_File_API_in_chrome_code

___
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform



___
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform


Re: File() constructor with a string argument no longer works since Firefox 52a?

2016-11-22 Thread Kris Maglione

See https://bugzil.la/1303518

On Wed, Nov 23, 2016 at 01:48:43PM +0800, 段垚 wrote:

Hi,

In Firefox 51 chrome code, this code works: `new File(path_to_file)` , 
if  `path_to_file` exists.


However in Firefox 52a (2016-11-22),an execption is thrown: 
"TypeError: Not enough arguments to File".


I don't see a deprecation or removing note in the dev-doc[1], what's 
the problem?


Thanks.


[1] 
https://developer.mozilla.org/en-US/docs/Extensions/Using_the_DOM_File_API_in_chrome_code

___
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform


File() constructor with a string argument no longer works since Firefox 52a?

2016-11-22 Thread 段垚

Hi,

In Firefox 51 chrome code, this code works: `new File(path_to_file)` , 
if  `path_to_file` exists.


However in Firefox 52a (2016-11-22),an execption is thrown: "TypeError: 
Not enough arguments to File".


I don't see a deprecation or removing note in the dev-doc[1], what's the 
problem?


Thanks.


[1] 
https://developer.mozilla.org/en-US/docs/Extensions/Using_the_DOM_File_API_in_chrome_code



___
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform