Skip to content

Instantly share code, notes, and snippets.

@johnmdonahue
Created August 11, 2012 01:30
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save johnmdonahue/3319797 to your computer and use it in GitHub Desktop.
Save johnmdonahue/3319797 to your computer and use it in GitHub Desktop.
EE Mocha Port Questions

I ran into a few things working on the mocha port, these are the ones I was smart enough to write down but if the others come to me I'll let you know.

  1. Would it make sense to give both the preview and edit iframes a div with an id or at least give the bodies id's? It would make this simpler: https://github.com/OscarGodson/EpicEditor/blob/858425d10a8e23eb3303d4847b0781f09f7dce67/test/test.getElement.js#L40

  2. Why does the editor throw an error on multiple unloads instead of just ignoring it like load? Maybe we can just check to see if it's loaded and if not don't unload it. Thoughts?

@OscarGodson
Copy link

  1. Sure. Probably don't want to just check a property on the body tho and instead look for an ID like epiceditor-editor-body and epiceditor-preview-body.
  2. This was part of the error stuff. Originally I wanted to throw a bunch of errors. Now I don't want to throw errors :P Instead I want to allow developers to watch for errors. We can remove the throw errors now and emit them. I'll do that for the next release, 0.1.3.

@OscarGodson
Copy link

FWIW, the reason why I changed my mind was seeing who was using the editor. It was more designery people, not JS really hardcore JS devs who know how to handle and errors and what they mean. I got a couple people asking why the errors were there and if it would break anything.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment