javascriptphantomjsqunitchutzpah

Does phantomJS support geolocations?


I'm trying to run qunit test cases with PhantomJS. One of my tests are hanging in when phantomJS try to access the navigator.geolocation function of DOM. same test is working fine in the browser, just hangs in the console with phantomJS.

doe phantomJS support geolocations ? any suggestion?

breaks in the following if condition

  if(navigator.geolocation) {
            window.navigator.geolocation.watchPosition(updateLocation, null, { frequency: 3000 });
        }

Solution

  • No.

    Simply check the features.js example.

    >phantomjs.exe features.js
    Detected features (using Modernizr 2.0.6):
    
    Supported:
      touch
      generatedcontent
      fontface
      flexbox
      canvas
      canvastext
      postmessage
      websqldatabase
      hashchange
      history
      draganddrop
      websockets
      rgba
      hsla
      multiplebgs
      backgroundsize
      borderimage
      borderradius
      boxshadow
      textshadow
      opacity
      cssanimations
      csscolumns
      cssgradients
      cssreflections
      csstransforms
      csstransitions
      localstorage
      sessionstorage
      webworkers
      applicationcache
      svg
      inlinesvg
      smil
      svgclippaths
    
    Not supported:
      csstransforms3d
      webgl
      geolocation
      indexeddb
      video
      audio