Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

avm2: Implement XMLList.contains #14160

Closed

Conversation

Lord-McSweeney
Copy link
Collaborator

No description provided.

@sleepycatcoding
Copy link
Member

sleepycatcoding commented Nov 25, 2023

This does not seem to be entirely correct.

var x = new XMLList("<item>A</item><item>B</item>");
var x1 = new XMLList("<item>A</item>");

trace(x.contains("A")); // False with this PR, true in Flash
trace(x.contains("B")); // False with this PR, true in Flash

trace(x.contains(x));
trace(x.contains(x1));

trace(x.contains(new XML("<item>A</item>")));

@Lord-McSweeney Lord-McSweeney marked this pull request as draft November 25, 2023 20:29
@kmeisthax
Copy link
Member

@sleepycatcoding On xml_list.rs line 221 it specifically returns false if the XMLList holds more than one node - i.e. multiple nodes in an XMLList isn't implemented yet.

@sleepycatcoding
Copy link
Member

@sleepycatcoding On xml_list.rs line 221 it specifically returns false if the XMLList holds more than one node - i.e. multiple nodes in an XMLList isn't implemented yet.

Yeah, I know, this was just some code I wrote for testing and I copied all of it into the comment 😅, I more meant that x.contains("A") did not work as expected.

@Lord-McSweeney
Copy link
Collaborator Author

On xml_list.rs line 221 it specifically returns false if the XMLList holds more than one node - i.e. multiple nodes in an XMLList isn't implemented yet.

@kmeisthax This seemed to match FP from my testings, .contains([some multi-node XMLList]) will always return false.

@danielhjacobs danielhjacobs added avm2 AVM2 (ActionScript 3.0) issues waiting-on-author Waiting on the PR author to make the requested changes labels Mar 5, 2024
@Lord-McSweeney
Copy link
Collaborator Author

Superseded by #16525.

@danielhjacobs danielhjacobs removed the waiting-on-author Waiting on the PR author to make the requested changes label May 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
avm2 AVM2 (ActionScript 3.0) issues
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants