Skip to content

Commit

Permalink
avm2: Fix incorrect XMLList method signatures
Browse files Browse the repository at this point in the history
  • Loading branch information
sleepycatcoding authored and Aaron1011 committed Oct 22, 2023
1 parent 172c105 commit 10cf247
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions core/src/avm2/globals/XMLList.as
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,12 @@ package {
AS3 native function copy():XMLList;
AS3 native function attribute(name:*):XMLList;
AS3 native function attributes():XMLList;
AS3 native function descendants(name:Object = "*"):XMLList;
AS3 native function descendants(name:* = "*"):XMLList;
AS3 native function text():XMLList;
AS3 native function toXMLString():String;
AS3 native function toString():String;
AS3 native function comments():XMLList;
AS3 native function processingInstructions(name:String = "*"):XMLList;
AS3 native function processingInstructions(name:* = "*"):XMLList;

// The following native methods are not declared in the documentation,
// but still exist
Expand Down Expand Up @@ -56,7 +56,7 @@ package {
}

prototype.child = function(name:Object):XMLList {
var self:XML = this;
var self:XMLList = this;
return self.AS3::child(name);
};

Expand Down Expand Up @@ -95,7 +95,7 @@ package {
return self.AS3::name();
}

prototype.descendants = function(name:Object):XMLList {
prototype.descendants = function(name:* = "*"):XMLList {
var self:XMLList = this;
return self.AS3::descendants(name);
}
Expand All @@ -106,16 +106,16 @@ package {
}

prototype.comments = function():XMLList {
var self:XML = this;
var self:XMLList = this;
return self.AS3::comments();
}

prototype.toJSON = function(k:String):* {
return "XMLList";
};

prototype.processingInstructions = function(name:String = "*"):XMLList {
var self:XML = this;
prototype.processingInstructions = function(name:* = "*"):XMLList {
var self:XMLList = this;
return self.AS3::processingInstructions(name);
}

Expand Down

0 comments on commit 10cf247

Please sign in to comment.