WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
166056
Object.prototype.toString(m) !== '[object Module]'
https://bugs.webkit.org/show_bug.cgi?id=166056
Summary
Object.prototype.toString(m) !== '[object Module]'
Guy Bedford
Reported
2016-12-20 05:36:09 PST
In the module system, the `Symbol.toStringTag` on the module namespace object should be resulting in the following holding true: ``` import * as m from './m.js'; Object.prototype.toString(m) === '[object Module]'; ``` But the above is currently returning `[object Object]` instead. This is a useful feature for detecting if a given object is a module namespace object, which will likely be necessary for interop use cases in future.
Attachments
Add attachment
proposed patch, testcase, etc.
Guy Bedford
Comment 1
2016-12-20 05:41:37 PST
Apologies - this works fine with `Object.prototype.toString.call(m)`... I missed the `call` here in my test! It works fine :)
Yusuke Suzuki
Comment 2
2016-12-20 05:46:53 PST
Ah, OK :) No problem. Thank you for trying!
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug