let page_size = 0;
chrome.webRequest.onHeadersReceived.addListener(details=>{
details.responseHeaders.forEach(function(v){
if(v.name == 'Content-Length') {
page_size += v.value;
console.log(page_size);
break;
});
},{'urls' : ["<all_urls>"]},["responseHeaders"]);
$parent = new Parent()
$arr = array();
$arr[] = $parent;
$arr[] = $parent->addChild()
$arr[] = $parent->addChild()
$arr[] = $parent->addChild()
// [Object, Object, Object, Object]
$x = $arr[2];