Questions tagged [browser-console]

60 questions
0
votes
0 answers

How to include JS file link into Browser console

I want to include a file into the Browser console. I have used document.write(""); but i get this error: Refused to load the script '...' because…
Manue
  • 1
0
votes
1 answer

Angular: Refresh DOM after manupulating code using browser console javascript

A website is written in Angular.js and they have filtering options which have all the categories checked by default with No "Clear All" filter options. Like this website image (This is Amazon), they have a clear button, but the website I want to…
Sarthak Kuchhal
  • 340
  • 2
  • 11
0
votes
0 answers

How to configure JSHint to catch TypeErrors as in a browser console?

I am working on a custom editor which uses Monaco editor to accept the user snippets (pre-defined in JS lang) and I am using JSHint to evaluate their validity before submitting it to the backend. There are a set number of custom functions acceptable…
Naser Mohd Baig
  • 155
  • 1
  • 13
0
votes
2 answers

Working on CSP headers, seeing console browser as Refused to execute inline script because it violates the following Content Security Policy directive

#console browser issue for Content security Policy Refused to execute inline script because it violates the following Content Security Policy directive: "script-src 'self'". Either the 'unsafe-inline' keyword, a hash…
Dones
  • 5
  • 1
0
votes
2 answers

Unable to retrieve ID of dropdown menu as the page reloads when I try to inspect elements

Below is a screenshot of a webpage that I am trying to write a Cypress test for. As you can see, I have managed to write "teladoc" into the input box, but I now need to click the dropdown menu to navigate to a different page. I am not able to get…
user9847788
  • 2,135
  • 5
  • 31
  • 79
0
votes
0 answers

Respond when the user enters a string into the browser console

I'm building a website with Glitch. When you press F12 on the webpage and enter the console, I want to be able to respond to a specific input to produce an outcome. Like, if the user types 'hello world' it should log 'lorem ipsum' in the console in…
0
votes
0 answers

JavaScript works if injected manually into the console but not automatically

I made a script to check if the number of orders has changed by refreshing the page every few seconds so I can email my self if there's a new order . I used emailjs for the emailing part so I injected the emailjs library then sent the email , in the…
jweaker
  • 1
  • 1
0
votes
2 answers

document.querySelector not working on dynamic content

Why when I'm using document.querySelector on a dynamic HTML element, it won't give me the current dynamically set data? Is there a way to get the current data? Example: If I go to this stripe page with dynamic html, and I copy the JS path of this…
0
votes
1 answer

Can't get Angular compiler error in browser Console

When I have an error in my Typescript code I can't get the browser Console window to display the compiler error. Instead I get this: Uncaught Error: Angular JIT compilation failed: '@angular/compiler' not loaded! - JIT compilation is discouraged…
CJ7
  • 22,579
  • 65
  • 193
  • 321
0
votes
0 answers

Dropdown list option selection not generating second dropdown list options

Hi I'm new to javascript but I want to automate a simple web form which includes 2 dropdown lists. Upon the selection of an item in first dropdown list the second dropdown list should appear. I used the following code to run in Chrome browser's…
kodysimp
  • 1
  • 1
0
votes
0 answers

Capture jQuery $.ajax error (or Browser console error) in Javascript

Here is a basic jQuery $ajax function, where I purposely call a fake endpoint; const URL_RESTEndpoint = "http://localhost/api/MyEndpointIntentionalNotExist" $.ajax( { url: URL_RESTEndpoint, method: "PATCH", //etc... }) .done( (data,…
joedotnot
  • 4,810
  • 8
  • 59
  • 91
0
votes
1 answer

How can I make jQuery ajax calls produce a response in the browser console?

I'm caching a number a links in a database via a page crawler that makes ajax calls with jQuery. Before making an ajax call to a remote site, I make sure the link address has one of a list of domains or has one of two file extensions: var j =…
Keyslinger
  • 4,903
  • 7
  • 42
  • 50
0
votes
1 answer

How to import a NPM package into browser's console

Just to play around with some package functions I want to import it into my browser's console. I have tried this approach, but it gives a parsing error. var script = document.createElement('script'); script.type = 'text/javascript'; script.src =…
Hafiz Temuri
  • 3,882
  • 6
  • 41
  • 66
0
votes
0 answers

Browser console to set document.location.href and react on page load

Background / use case I would like to automate some page interactions by pasting a script into my browser console (normally Chrome/Chromium or in my case IE11 because.. don't ask.) Typical steps in one iteration: (initial) Visit a page, wait until…
donquixote
  • 4,877
  • 3
  • 31
  • 54
0
votes
0 answers

find all listeners of a DOM element

I have a program which runs just fine in the console, because I paste it into the browser console. It uses the console's function getEventListeners which is very handy to get the handlers for specific events. However, I would like to do this for a…
Jeanluca Scaljeri
  • 26,343
  • 56
  • 205
  • 333