Code Monkey home page Code Monkey logo

Comments (12)

aljinovic avatar aljinovic commented on August 27, 2024

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.

raveren avatar raveren commented on August 27, 2024

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.

raveren avatar raveren commented on August 27, 2024

Even the dumped object in your demo is awesomely crafted to showcase most of Kint features, that's just wonderful :)

from kint.

aljinovic avatar aljinovic commented on August 27, 2024

I was planing of making an interactive demo where you can switch themes and see the actual code behind, if you agree ;)

from kint.

raveren avatar raveren commented on August 27, 2024

That would be stellar! :)

from kint.

aljinovic avatar aljinovic commented on August 27, 2024

I've created a simple demo with theme switcher: http://www.opengluco.com/demo/kint/demo.php

Any suggestions?

from kint.

raveren avatar raveren commented on August 27, 2024

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.

aljinovic avatar aljinovic commented on August 27, 2024

My colleague did the theme, he'll make a pull request when it's done.

from kint.

raveren avatar raveren commented on August 27, 2024

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.

aljinovic avatar aljinovic commented on August 27, 2024

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 (

  • element):

    bug

  • from kint.

    raveren avatar raveren commented on August 27, 2024

    Thanks, fixed!

    from kint.

    GlassGruber avatar GlassGruber commented on August 27, 2024

    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)

    Recommend Projects

    • React photo React

      A declarative, efficient, and flexible JavaScript library for building user interfaces.

    • Vue.js photo Vue.js

      🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

    • Typescript photo Typescript

      TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

    • TensorFlow photo TensorFlow

      An Open Source Machine Learning Framework for Everyone

    • Django photo Django

      The Web framework for perfectionists with deadlines.

    • D3 photo 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.

    • Game

      Some thing interesting about game, make everyone happy.

    Recommend Org

    • Facebook photo Facebook

      We are working to build community through open source technology. NB: members must have two-factor auth.

    • Microsoft photo Microsoft

      Open source projects and samples from Microsoft.

    • Google photo Google

      Google ❤️ Open Source for everyone.

    • D3 photo D3

      Data-Driven Documents codes.