MicrosoftEdge / MicrosoftEdge/WebView2Feedback
wv2winrt javascript case for static methods projection
@david-risney is already working on this.
Since Jul 21, 2022.
- Dominant language
- PowerShell
- Stars
- 526
- Forks
- 67
- PR merge metrics
- No merged PRs in 30d
Description
Description
According to https://docs.microsoft.com/en-us/microsoft-edge/webview2/how-to/winrt-from-js?tabs=csharp, if "Use JavaScript case" is set to yes, then the JS projection should use JS case. My understanding is the methods shall start with lower case.
But it doesn't seem the case for windows.storage.storagefile.getfilefrompathasync which is a static method. The projection of it is GetFileFromPathAsync, rather than getFileFromPathAsync.
Version
SDK: 1.0.1305-prerelease
Runtime:
Framework: WinRT
OS: Win11
Repro Steps
Screenshots
Additional context
As I can check in Generated Files\wv2winrt\Windows.System.g.cpp,
here it's getFileFromPathAsync
HRESULT Static_Class_Windows_Storage_StorageFile::GetPropertyNames(wchar_t*** namesOut, size_t* namesLengthOut)
{
static wchar_t* names[] = {
const_cast<wchar_t*>(L"getFileFromPathAsync"),
here it's GetFileFromPathAsync
HRESULT Static_Class_Windows_Storage_StorageFile::GetIDsOfNames(
REFIID riid,
LPOLESTR* names,
unsigned int namesCount,
LCID localeId,
DISPID* dispId)
{
HRESULT hr = DispatchBase::GetIDsOfNames(
riid, names, namesCount, localeId, dispId);
if (SUCCEEDED(hr))
{
hr = DISP_E_MEMBERNOTFOUND;
if (wcscmp(names[0], L"GetFileFromPathAsync") == 0)
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.