PyMiniRacer icon indicating copy to clipboard operation
PyMiniRacer copied to clipboard

When plan to implement btoa atob TextDecoder TextEncoder Apis?

Open awjd007 opened this issue 1 year ago • 1 comments

Steps to reproduce

from py_mini_racer import MiniRacer racer = MiniRacer() result = racer.eval("btoa") print(result) result = racer.eval("btoa") print(result) result = racer.eval("TextEncoder ") print(result)

Expected behavior

I hope the author can implement these important APIs, as PyExecutJS has already implemented them

Actual behavior

py_mini_racer._types.JSEvalException: :1: ReferenceError: btoa is not defined btoa ^ py_mini_racer._types.JSEvalException: :1: ReferenceError: atob is not defined atob ^ py_mini_racer._types.JSEvalException: :1: ReferenceError: TextEncoder is not defined TextEncoder ^

System configuration

PyMiniRacer version: 0.12.4 Python version: 3.10

awjd007 avatar Sep 12 '24 07:09 awjd007

Hi!

These are Web APIs, not JavaScript APIs, so the answer "is not likely soon if ever".

PyMiniRacer is primarily a wrapper of V8, which implements the JavaScript standard and not Web APIs.

bpcreech avatar Feb 03 '25 03:02 bpcreech