Skip to content

Commit 9cfd510

Browse files
committed
Small changes.
1 parent 850cfa2 commit 9cfd510

4 files changed

Lines changed: 14 additions & 18 deletions

File tree

CSharpToJavaScript/APIs/JS/EventTarget.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,14 @@ namespace CSharpToJavaScript.APIs.JS;
66

77
public partial class EventTarget
88
{
9-
[To(ToAttribute.FirstCharToLowerCase)]
9+
[Value("addEventListener")]
1010
public GlobalObject.Undefined AddEventListener(string type, Action? callback, Union26 options) { throw new System.NotImplementedException(); }
11-
[To(ToAttribute.FirstCharToLowerCase)]
11+
[Value("addEventListener")]
1212
public GlobalObject.Undefined AddEventListener(string type, Action<MouseEvent>? callback, Union26 options) { throw new System.NotImplementedException(); }
13-
[To(ToAttribute.FirstCharToLowerCase)]
13+
[Value("addEventListener")]
1414
public GlobalObject.Undefined AddEventListener(string type, Action<Event>? callback, Union26 options) { throw new System.NotImplementedException(); }
1515

16-
[To(ToAttribute.FirstCharToLowerCase)]
16+
[Value("removeEventListener")]
1717
public GlobalObject.Undefined RemoveEventListener(string type, Action? callback, Union27 options) { throw new System.NotImplementedException(); }
1818

1919
}

CSharpToJavaScript/APIs/JS/ParentNode.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ namespace CSharpToJavaScript.APIs.JS;
55
public partial interface ParentNode
66
{
77
///<include file='CSharpToJavaScript/Utils/Docs/element/element.generated.xml' path='docs/ElementQuerySelector/*'/>
8-
[To(ToAttribute.FirstCharToLowerCase)]
8+
[Value("querySelector")]
99
public T? QuerySelector<T>(string selectors) where T : Element { throw new System.NotImplementedException(); }
1010
}
1111

CSharpToJavaScript/APIs/JS/WindowOrWorkerGlobalScope.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,12 @@ namespace CSharpToJavaScript.APIs.JS;
66

77
public partial interface WindowOrWorkerGlobalScope
88
{
9-
[To(ToAttribute.FirstCharToLowerCase)]
9+
[Value("setTimeout")]
1010
public long SetTimeout(Action handler, long timeout, params dynamic[] arguments) { throw new System.NotImplementedException(); }
1111

12-
[To(ToAttribute.FirstCharToLowerCase)]
12+
[Value("setInterval")]
1313
public long SetInterval(Action handler, long timeout, params dynamic[] arguments) { throw new System.NotImplementedException(); }
14-
[To(ToAttribute.FirstCharToLowerCase)]
14+
[Value("fetch")]
1515
public Task<Response> Fetch(string input) { throw new System.NotImplementedException(); }
1616

1717
}

CSharpToJavaScript/CSTOJS.cs

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -117,12 +117,12 @@ public static FileData[] Translate(FileData[] files, MetadataReference[]? refere
117117
});
118118

119119
if (files[i].OptionsForFile.Debug)
120-
files[i].Debug_WithSemanticRewriter = _root.ToFullString();
120+
files[i].DebugStrings[0] = _root.ToFullString();
121121

122122
_root = _withoutSemanticRewriter.Visit(_root);
123123

124124
if (files[i].OptionsForFile.Debug)
125-
files[i].Debug_WithoutSemanticRewriter = _root.ToFullString();
125+
files[i].DebugStrings[1] = _root.ToFullString();
126126

127127
if (files[i].OptionsForFile.NormalizeWhitespace)
128128
_root = _root.NormalizeWhitespace();
@@ -477,14 +477,10 @@ public class FileData
477477
/// </summary>
478478
public string TranslatedStr { get; set; } = string.Empty;
479479

480-
481-
/// <summary>
482-
/// Debug string.
483-
/// </summary>
484-
public string Debug_WithSemanticRewriter { get; set; } = string.Empty;
485-
486480
/// <summary>
487-
/// Debug string.
481+
/// Debug strings.
482+
/// 0: WithSemanticWalker
483+
/// 1: WithoutSemanticRewriter
488484
/// </summary>
489-
public string Debug_WithoutSemanticRewriter { get; set; } = string.Empty;
485+
public string[] DebugStrings { get; set; } = [string.Empty, string.Empty];
490486
}

0 commit comments

Comments
 (0)