grunt-html-inspector icon indicating copy to clipboard operation
grunt-html-inspector copied to clipboard

Allow for configuration of HTML Inspector by Grunt Parameters

Open gotdibbs opened this issue 11 years ago • 2 comments

  • Currently you have to modify the bridge or create your own to have a custom configuration.
  • HTML Inspector now (as of v.0.3.0) supports a setConfig function which can be invoked before a call to inspect

gotdibbs avatar Jun 28 '13 18:06 gotdibbs

Could you elaborate how the bridge works? I can't seem to figure it out.

Skinner927 avatar Mar 27 '14 03:03 Skinner927

@Skinner927 The bridge.js file is the default bridge. The way it works is after the page has loaded, the JavaScript file is injected into the currently loaded page, parsed, and executed. The default bridge is pretty simple. There are two functions _parseError which handles formatting error messages from HTMLInspector and sendMessage which really is just a wrapper around native alert. Since PhantomJS is headless webkit, alert will not actually display any UI, right? So instead alert is used for passing messages back to the the grunt task running PhantomJS. The other fragment of the file is just the call to start HTMLInspector.

gotdibbs avatar Mar 30 '14 01:03 gotdibbs