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

Fix the bindings for performance.now() and document.* #2657

Merged
merged 1 commit into from Apr 23, 2023

Conversation

CountBleck
Copy link
Member

performance.now() and co. need to be called with the proper this value.

Changes proposed in this pull request:
⯈ Ensure performance.now() is called properly.
⯈ Ensure document.* is called properly.

  • I've read the contributing guidelines
  • I've added my name and email to the NOTICE file

@CountBleck
Copy link
Member Author

On a related note, does AS's document.cookie update throughout the page's lifetime?

@MaxGraey
Copy link
Member

MaxGraey commented Feb 25, 2023

Hmm, it should be a default behavior until @external.js is not exposed explicitly. Perhaps better to fix this in src/bindings/js.ts

@CountBleck
Copy link
Member Author

What about, say, importing functions from Wasm that return v128?
Anyhow, I think your idea should be as simple as removing this branch or adding a && isIdentifier(name) to the condition.

This change should ensure performance.now() and document.foo() does not
break.
@CountBleck
Copy link
Member Author

This PR should also fix #2692 (I hope).

@dcodeIO dcodeIO merged commit 688746a into AssemblyScript:main Apr 23, 2023
@CountBleck CountBleck deleted the fix-performance-now branch October 9, 2023 00:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants