extism/js-pdk

Conform to W3C spec for console.log, error, etc

Closed this issue · 1 comments

As mentioned in the comments in #68, we do not conform to the full spec for console.log and the other methods on console. We should refactor it to be compliant. There are two paths:

  1. write some more rust code to emulate how
  2. expose the underlying IO functions and implement the console object in the js layer

For path number 2 you'd expose extism log functions as global js functions like this:

const __decodeUtf8BufferToString = globalThis.__decodeUtf8BufferToString;

then you'd implement the console object and it's methods in javascript

Closed by #80