|
| 1 | +using CSharpToJavaScript.Utils; |
| 2 | +using System; |
| 3 | +using System.Collections.Generic; |
| 4 | +using System.ComponentModel; |
| 5 | +using System.Linq; |
| 6 | +using System.Text; |
| 7 | +using System.Threading.Tasks; |
| 8 | + |
| 9 | +namespace CSharpToJavaScript.APIs.JS |
| 10 | +{ |
| 11 | + //https://262.ecma-international.org/14.0/#sec-global-object |
| 12 | + public class GlobalObject |
| 13 | + { |
| 14 | + [To(ToAttribute.FirstCharToLowerCase)] |
| 15 | + public class GlobalThis |
| 16 | + { |
| 17 | + public static Window Window { get; set; } = new(); |
| 18 | + public static console Console { get; set; } = new(); |
| 19 | + } |
| 20 | + |
| 21 | + [To(ToAttribute.Default)] |
| 22 | + public class Infinity |
| 23 | + { |
| 24 | + |
| 25 | + } |
| 26 | + [To(ToAttribute.Default)] |
| 27 | + public class NaN |
| 28 | + { |
| 29 | + |
| 30 | + } |
| 31 | + |
| 32 | + [To(ToAttribute.FirstCharToLowerCase)] |
| 33 | + public class Undefined |
| 34 | + { |
| 35 | + |
| 36 | + } |
| 37 | + |
| 38 | + //Do I need this? TODO! |
| 39 | + //https://262.ecma-international.org/14.0/#sec-constructor-properties-of-the-global-object |
| 40 | + // |
| 41 | + |
| 42 | + [To(ToAttribute.FirstCharToLowerCase)] |
| 43 | + public static dynamic Eval(string x) |
| 44 | + { |
| 45 | + throw new System.NotImplementedException(); |
| 46 | + } |
| 47 | + |
| 48 | + [To(ToAttribute.FirstCharToLowerCase)] |
| 49 | + public static bool IsFinite(float number) |
| 50 | + { |
| 51 | + throw new System.NotImplementedException(); |
| 52 | + } |
| 53 | + |
| 54 | + [To(ToAttribute.FirstCharToLowerCase)] |
| 55 | + public static bool IsNaN(float number) |
| 56 | + { |
| 57 | + throw new System.NotImplementedException(); |
| 58 | + } |
| 59 | + |
| 60 | + [To(ToAttribute.FirstCharToLowerCase)] |
| 61 | + public static float ParseFloat(string str) |
| 62 | + { |
| 63 | + throw new System.NotImplementedException(); |
| 64 | + } |
| 65 | + |
| 66 | + [To(ToAttribute.FirstCharToLowerCase)] |
| 67 | + public static int ParseInt(string str, int? radix = null) |
| 68 | + { |
| 69 | + throw new System.NotImplementedException(); |
| 70 | + } |
| 71 | + |
| 72 | + [To(ToAttribute.FirstCharToLowerCase)] |
| 73 | + public static string DecodeURI(string encodedURI) |
| 74 | + { |
| 75 | + throw new System.NotImplementedException(); |
| 76 | + } |
| 77 | + |
| 78 | + [To(ToAttribute.FirstCharToLowerCase)] |
| 79 | + public static string DecodeURIComponent(string encodedURIComponent) |
| 80 | + { |
| 81 | + throw new System.NotImplementedException(); |
| 82 | + } |
| 83 | + |
| 84 | + [To(ToAttribute.FirstCharToLowerCase)] |
| 85 | + public static string EncodeURI(string uri) |
| 86 | + { |
| 87 | + throw new System.NotImplementedException(); |
| 88 | + } |
| 89 | + |
| 90 | + [To(ToAttribute.FirstCharToLowerCase)] |
| 91 | + public static string EncodeURIComponent(string uriComponent) |
| 92 | + { |
| 93 | + throw new System.NotImplementedException(); |
| 94 | + } |
| 95 | + } |
| 96 | +} |
0 commit comments