Question

I'm currently running a Jasmine spec that checks the DOM position of some elements after running some logic on them. Works in all browsers except PhantomJS, which returns NaN for both .left and .top on any .position() call. Has anyone else seen this?

Était-ce utile?

La solution

I found it wasn't the position() call after all, it was a previous call using css "calc". This CSS function is not supported in QTWebkit, which PhantomJS uses. Worth knowing.

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top