var thisline = new Error().lineNumber
If that doesn’t work in whatever environment you’re using, you can try:
var stack = new Error().stack
Then hunt through the stack for the line number.
More Related Contents:
- Get current url in Angular [duplicate]
- How can I animate the drawing of text on a web page?
- Run command after webpack build
- Dynamically Rendering a React component
- how to auto select an input field and the text in it on page load
- Generating sound on the fly with javascript/html5
- Prevent click event from firing when dblclick event fires
- Regex JavaScript image file extension [closed]
- javascript close current window
- Programmatically creating an SVG image element with javascript
- Synchronous XMLHttpRequest on the main thread is deprecated
- Performance penalty of creating handlers on every render with react-hooks
- Can I do SendKeys in Javascript?
- Javascript float subtract
- Threejs: assign different colors to each vertex in a geometry
- jQuery: noConflict
- ASP.NET MVC Partial view ajax post?
- Web Audio API, get the output from the soundcard
- Disable images in Selenium Python
- Is there any size limitation for ajax post?
- How to get read data from response header in jquery/javascript [duplicate]
- What’s the purpose of a leading pipe when declaring a type on Typescript
- Return value of Promise’s resolve/reject functions
- Use of require(lib) versus in Electron apps
- A JavaScript function that returns the x,y points of intersection between two circles?
- onclick calling hide-div function not working
- How to get the total depth of an unknown JSON hierarchy?
- Internet Explorer full screen mode?
- How to programmatically fill input elements built with React?
- Owl Carousel Won’t Autoplay