|
@@ -61,6 +61,7 @@ type
|
|
procedure TestWJ_IntfFunction_SequenceResult;
|
|
procedure TestWJ_IntfFunction_SequenceResult;
|
|
procedure TestWJ_IntfFunction_GlobalSequenceResult;
|
|
procedure TestWJ_IntfFunction_GlobalSequenceResult;
|
|
procedure TestWJ_IntfFunction_ChromeOnly;
|
|
procedure TestWJ_IntfFunction_ChromeOnly;
|
|
|
|
+ procedure TestWJ_IntfFunction_ChromeOnlyNewObject;
|
|
// Namespace attribute
|
|
// Namespace attribute
|
|
procedure TestWJ_NamespaceAttribute_Boolean;
|
|
procedure TestWJ_NamespaceAttribute_Boolean;
|
|
// maplike
|
|
// maplike
|
|
@@ -1306,6 +1307,46 @@ begin
|
|
]);
|
|
]);
|
|
end;
|
|
end;
|
|
|
|
|
|
|
|
+procedure TTestWebIDL2WasmJob.TestWJ_IntfFunction_ChromeOnlyNewObject;
|
|
|
|
+begin
|
|
|
|
+
|
|
|
|
+ TestWebIDL([
|
|
|
|
+ 'interface Attr {',
|
|
|
|
+ ' [ChromeOnly, NewObject] ',
|
|
|
|
+ ' ConsoleInstance createInstance(optional ConsoleInstanceOptions options = {});',
|
|
|
|
+ '};'
|
|
|
|
+ ],
|
|
|
|
+ [
|
|
|
|
+ 'Type',
|
|
|
|
+ ' // Forward class definitions',
|
|
|
|
+ ' IJSAttr = interface;',
|
|
|
|
+ ' TJSAttr = class;',
|
|
|
|
+ ' { --------------------------------------------------------------------',
|
|
|
|
+ ' TJSAttr',
|
|
|
|
+ ' --------------------------------------------------------------------}',
|
|
|
|
+ '',
|
|
|
|
+ ' IJSAttr = interface(IJSObject)',
|
|
|
|
+ ' [''{AA94F48A-9540-32B7-B05B-E99EB8B2AF2A}'']',
|
|
|
|
+ ' end;',
|
|
|
|
+ '',
|
|
|
|
+ ' TJSAttr = class(TJSObject,IJSAttr)',
|
|
|
|
+ ' Private',
|
|
|
|
+ ' Public',
|
|
|
|
+ ' class function Cast(const Intf: IJSObject): IJSAttr;',
|
|
|
|
+ ' end;',
|
|
|
|
+ '',
|
|
|
|
+ 'implementation',
|
|
|
|
+ '',
|
|
|
|
+ 'class function TJSAttr.Cast(const Intf: IJSObject): IJSAttr;',
|
|
|
|
+ 'begin',
|
|
|
|
+ ' Result:=TJSAttr.JOBCast(Intf);',
|
|
|
|
+ 'end;',
|
|
|
|
+ '',
|
|
|
|
+ 'end.',
|
|
|
|
+ ''
|
|
|
|
+ ]);
|
|
|
|
+end;
|
|
|
|
+
|
|
|
|
|
|
procedure TTestWebIDL2WasmJob.TestWJ_NamespaceAttribute_Boolean;
|
|
procedure TTestWebIDL2WasmJob.TestWJ_NamespaceAttribute_Boolean;
|
|
begin
|
|
begin
|