android-js / androidjs

Platform to build android app using node js
MIT License
462 stars 109 forks source link

cannot use ajax with jquery #297

Closed hotsixman closed 1 year ago

hotsixman commented 1 year ago

Describe the bug

jQuery works, but this code doesn't work document.querySelector('button').addEventListener('click', function(){ $.ajax({ type: "GET", url: "https://google.com", success: function(data){ alert(data); }, error: function(request, status, error){ alert("code:" + request.status + "\n" + "message:" + request.responseText + "\n" + "error:" + error);})})

To Reproduce Steps to reproduce the behavior:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

Expected behavior A clear and concise description of what you expected to happen.

Screenshots If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

Smartphone (please complete the following information):

Additional context Add any other context about the problem here.