Commit ce861653 authored by rockyl's avatar rockyl

debugMode

parent 7e99b4f9
{ {
"name": "html-shot", "name": "html-shot",
"version": "1.0.10", "version": "1.0.13",
"main": "dist/index.js", "main": "dist/index.js",
"types": "types/index.d.ts", "types": "types/index.d.ts",
"license": "MIT", "license": "MIT",
......
/**
* Created by rockyl on 2021/1/26.
*/
export const debugMode = window['html-shot/debug-mode'] || false;
/** /**
* Created by rockyl on 2021/1/11. * Created by rockyl on 2021/1/11.
*/ */
import {debugMode} from "./config";
const commonStyleKeys = [ const commonStyleKeys = [
'backgroundColor', 'backgroundColor',
...@@ -104,7 +105,11 @@ export function parseDom(el: HTMLElement = document.body) { ...@@ -104,7 +105,11 @@ export function parseDom(el: HTMLElement = document.body) {
nodes.push(vNode); nodes.push(vNode);
} }
}); });
console.log(nodes);
if(debugMode){
console.info(nodes);
}
return { return {
width, width,
height, height,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment