From 42de7f208c6d126fe54e444eb1acc6a9f8083402 Mon Sep 17 00:00:00 2001 From: kev Date: Mon, 19 Jan 2015 22:08:57 +0800 Subject: [PATCH] add position to frameData --- webkit/client.js | 19 ++----------------- webkit/frame.js | 32 ++++++++++++++++++++++++++++++++ 2 files changed, 34 insertions(+), 17 deletions(-) create mode 100644 webkit/frame.js diff --git a/webkit/client.js b/webkit/client.js index d4a831f..05c3f15 100644 --- a/webkit/client.js +++ b/webkit/client.js @@ -1,5 +1,6 @@ var webpage = require('webpage'); +var frame = require('./frame'); function setCookies(page, cookies) { @@ -40,22 +41,6 @@ function execScripts(page, scripts, arr) { } -function frameData(page, data) { - data.url = page.frameUrl; - data.name = page.frameName; - data.content = page.frameContent; - data.childCount = page.framesCount; - data.childFrames = []; - for(var i=0; i