tarvk / chromeconsole Goto Github PK
View Code? Open in Web Editor NEWA recreation of the chrome console interface to be embedded on web pages
Home Page: https://tarvk.github.io/chromeConsole/About.html
License: MIT License
A recreation of the chrome console interface to be embedded on web pages
Home Page: https://tarvk.github.io/chromeConsole/About.html
License: MIT License
Running the below code:
a=/a/
a.b=1
a
Shows the following subtree:
/a/
|- lastIndex: 0
| - __proto__: {...}
The real subtree however is:
/a/
|- lastIndex: 0
|- b: 1
| - __proto__: {...}
This bug is mainly due to extendedJSON handling RegEx objects as special objects and thus not transporting all of the data across.
Odd bug. I noticed it here: https://youtu.be/oX44CQpsk9M?t=197 at 3:24
Ultimately I lost what I typed and it wasn't saved in memory so I had to retype it.
After some discussion with @TarVK it seems that it only pushes to memory when hitting arrow up, but if you hit arrow down and never hit up before, it isn't in memory
<details>
seemed like a good idea at the time, but in practice it would have been better to make our own system for handling this.
It is very useful to be able to select information out of the history, however an issue can occur where, if you don't select anything you want to be able to immediately start typing again.
Ultimately, the input element should only ever be unfocussed if the user hasn't selected a portion of text.
Currently the following function:
function(a,b){
console.log(a+b)
}
Would be rendered as follows:
> f()
Chrome's actual console renders it as the following:
ƒ (a,b){
console.log(a+b)
}
I do like how chromeConsole presents the object drop down. However it really should also contain the arguments and body as well.
This should be realtively easy to implement with the toString()
method returning:
"function(a,b){
console.log(a+b)
}"
Replace the 1st function with a special colored ƒ and we're good to go!
If you run the same command over and over in memory then the same command is also added to memory each time. E.G.
console.log("hello world")
console.log("a")
console.log("a")
console.log("a")
Running these commands in sequence (not all together) will mean that you have to press the up
key 4 times to get back to console.log("hello world")
.
Chrome's console actually only adds a command to the memory buffer if it isn't identical to the last element in memory. E.G. The memory for:
console.log("a")
console.log("b")
console.log("a")
console.log("a")
console.log("a")
Will look like this:
console.log("a")
console.log("b")
console.log("a")
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.