SpiderMonkey and MockDOM Issues

29 views
Skip to first unread message

Kaleb Hornsby

unread,
Oct 6, 2010, 1:25:38 PM10/6/10
to MochiKit
I am running Ubuntu and have just discovered MochiKit in the
repositories. I attempted to start it with smjs, but I ran into an
error. I apparently needed MochiKit.MockDOM. I found it [online] [1]
on another site than mochikit's because their track server is down.
This seemed rather old. Sure enough, though, I loaded mockdom.js and
then loaded mochikit.js and it solved the error, but created another.

Sample output:

$ js
js> load('MochiKit.js')
MochiKit.js:3506: TypeError: this._document has no properties
js> load('MockDOM.js')
js> load('MochiKit.js')
MochiKit.js:4323: ReferenceError: navigator is not defined
js>

Does somebody have a more recent version of mockdom that works with
mochikit?

[1]: http://bknr.net/trac/browser/trunk/projects/quickhoney/website/static/MochiKit/MockDOM.js?rev=2828

Bob Ippolito

unread,
Oct 7, 2010, 7:54:26 AM10/7/10
to Kaleb Hornsby, MochiKit
No idea what you're trying to do but it sounds like whoever packaged
this with Ubuntu did the wrong thing.

Surely there must be an up to date mirror of mochikit on github or
something that can be used until service is restored.

> --
> You received this message because you are subscribed to the Google Groups "MochiKit" group.
> To post to this group, send email to moch...@googlegroups.com.
> To unsubscribe from this group, send email to mochikit+u...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/mochikit?hl=en.
>
>

Kaleb Hornsby

unread,
Oct 7, 2010, 9:21:19 AM10/7/10
to MochiKit
Since MochiKit makes JavaScript a more robust programming language, I
am trying to use both to do some server side programming. That's why
MochiKit provides a MockDOM. I think that overall, it should not be
coupled to the DOM at all.

On Oct 7, 7:54 am, Bob Ippolito <b...@redivi.com> wrote:
> No idea what you're trying to do but it sounds like whoever packaged
> this with Ubuntu did the wrong thing.
>
> Surely there must be an up to date mirror of mochikit on github or
> something that can be used until service is restored.
>
>
>
> On Thu, Oct 7, 2010 at 1:25 AM, Kaleb Hornsby <theka...@gmail.com> wrote:
> > I am running Ubuntu and have just discovered MochiKit in the
> > repositories. I attempted to start it with smjs, but I ran into an
> > error. I apparently needed MochiKit.MockDOM. I found it [online] [1]
> > on another site than mochikit's because their track server is down.
> > This seemed rather old. Sure enough, though, I loaded mockdom.js and
> > then loaded mochikit.js and it solved the error, but created another.
>
> > Sample output:
>
> >    $ js
> >    js> load('MochiKit.js')
> >    MochiKit.js:3506: TypeError: this._document has no properties
> >    js> load('MockDOM.js')
> >    js> load('MochiKit.js')
> >    MochiKit.js:4323: ReferenceError: navigator is not defined
> >    js>
>
> > Does somebody have a more recent version of mockdom that works with
> > mochikit?
>
> > [1]:http://bknr.net/trac/browser/trunk/projects/quickhoney/website/static...

Per Cederberg

unread,
Oct 7, 2010, 9:31:23 AM10/7/10
to MochiKit
When svn.mochikit.com is back up you can easily create your own
packaged version without any of the DOM packages. Don't know if any of
the magic initialization code in MochiKit uses the navigator, window
or document objects, but I guess they should detect if they are
missing. Otherwise we have a bug that should be fixed.

Let us know how it goes with a more minimal version of MochiKit,
preferably customized from the special download site.

Cheers,

/Per

Bob Ippolito

unread,
Oct 7, 2010, 1:12:59 PM10/7/10
to Kaleb Hornsby, MochiKit
MochiKit provides MockDOM so that some tests can be run without a full
browser environment. It does not exist for server-side programming
purposes, it was built before that was a really sensible thing to do.
Reply all
Reply to author
Forward
0 new messages