thomasboyt / coquette-inspect

A Chrome DevTools extension for inspecting games made with the Coquette framework
29 stars 14 forks source link

Serialize strategy for entities #2

Closed thomasboyt closed 9 years ago

thomasboyt commented 9 years ago

Concerns:

It seems like, before being sent through postMessage, an entity needs to be cleaned of unserializable parts. It seems like the only clean way to do this is to piggy-back off of an existing in-JS structured clone implementation.

Possible options:

thomasboyt commented 9 years ago

Whoops, chrome's port.postMessage is a TOTALLY DIFFERENT API from window.postMessage, and internally uses JSON.stringfy instead of a structured clone algorithm! Gross.

Will need to rethink.

thomasboyt commented 9 years ago

current status: fuckit.js