Comments (12)
I implemented this feature in my fork. Base64 was a bad idea because it breaks browser when there's a lot of debug data, so I implemented it this way:
newWindow = window.open();
if(newWindow) {
newWindow.document.open();
newWindow.document.write(html);
newWindow.document.close();
}
I fixed some compatibility issues with older PHP versions that don't support "static::" and "$var::" static calls.
Also, I fixed the bug with _stepIsInternal()
method: didn't detect call_user_func_array
inside Kint class as internal when short functions were called.
Result: http://www.opengluco.com/demo/kint/demo.php
Raveren, I'll make a pull request in 1.0.0-wip branch if you think this is OK.
Could you just tell me which minifier script you're using for .js so I can minify it again before merge since there are some changes inside also. Thanks!
from kint.
Wow, dude, that is terrific! Sure, please do a pull request, these changes are totally awesome.
I use a custom File Watchers Php storm plugin config, parameters of which are at the top of _kint.js (I know this sucks, I need to brush up contribution guidelines heavily).
You can however just use the online compiler on advanced settings and then wrap the output inside (function(){%output%})()
- the online tool does not support this configuration option.
from kint.
Even the dumped object in your demo is awesomely crafted to showcase most of Kint features, that's just wonderful :)
from kint.
I was planing of making an interactive demo where you can switch themes and see the actual code behind, if you agree ;)
from kint.
That would be stellar! :)
from kint.
I've created a simple demo with theme switcher: http://www.opengluco.com/demo/kint/demo.php
Any suggestions?
from kint.
Wow you even created a new theme :D Fucking A!
I'm finishing up with my own batch of changes and will comment further tomorrow.
from kint.
My colleague did the theme, he'll make a pull request when it's done.
from kint.
It's lovely, I can't wait to use it myself! :)
I'll be awaiting for the pull request and it would be great if you could put your demo in a new /examples
folder and pull request it too, we'll work from there.
Thanks again!
from kint.
Did you intentionally change the behavior of "open in new window"?
It dumps the parent if you click on some child (for example open some object and click on it's property to open it in new window and it opens all properties from the object).
Also, there's a small bug there (
from kint.
Thanks, fixed!
from kint.
Hey there, sorry to bump a closed thread but was wondering if this could be the default behavior for Kint.
Instead of being printed in the page directly, a new javascript window is opened with something like this
window.open(
'',
'Kint Window',
"height=500,width=500,toolbar=0,status=0,menubar=0,scrollbars=1,resizable=1",true
).document.write(kintOutput);
Does it make sense?
Btw is it possible to detach the already implemented pop out to a new window instead of a browser tab? Is there any config to allow this?
from kint.
Related Issues (20)
- How to use a plugin? HOT 5
- kint.phar: continue2 or break? HOT 6
- PHP 8.1 issue - passing a null parameter HOT 6
- TypeError str_replace(): Argument #3 ($subject) must be of type array|string, bool givenexi HOT 2
- Some HTML errors HOT 2
- Psalm false-positives HOT 1
- PHP Warning: realpath(): open_basedir restriction in effect
- Solarized-dark theme changes body text and background color HOT 5
- Simplexml parsing with PHP 8.2 and Apache and attribute leads to an segfault HOT 3
- SplFileInfoRepresentation: TypeError date(): Argument #2 ($timestamp) must be of type ?int, bool given HOT 3
- Phar build reproducability HOT 14
- file_exists(): Unable to find the wrapper "phar" HOT 10
- file_exists() throws exception when a NULL character exists in string HOT 4
- triple clicks marks the whole page
- Can't return plain text with modifiers HOT 2
- Fatal error: Uncaught Error: Class "Kint\Parser\Parser" not found
- Show dump time HOT 4
- Allow class in shallow_blacklist to display occurrences of same class in it's own dump HOT 2
- Symfony/Drupal: TypeError: Cannot assign stdClass to reference held by property of type array HOT 2
- Kint and Content Security Policy ( CSP ) HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from kint.