Thanks for the parallel downloading feature, Karl. I haven't used it yet, but I did track down something interesting today.

The site maerskline.com gave an error that it could not address the 'url' property of an object that didn't have it. I tracked this down to:

this.url = this.el.dataset.url

It turns out that properties in HTML tags that begin with "data-" are supposed to be available for retrieval with the "data-" stripped off. So the original HTML page had a div that said

<div class="p-page__header__options" data-url="/api_sc9/DecisionTree/GetStage?itemID={option-id}" data-cookie="">

And now it's expecting to be able to find that under (that div).dataset.url

So I thought we could do this in pushAttributes maybe?

First I established an empty "dataset" object in domLink. Then in pushAttributes, given the loop over attributes 'a' with values 'v', I wrote this, where substring is just some internet code. I'm just stripping off the first five characters. Karl, do you have something in stringfile.c that can do that?

if (strncmp(a[i],"data-",5)==0)
{
dso = get_property_object(t->jv,"dataset");
substring(a[i],token1,6,strlen(a[i])-(strlen(a[i]-5)));
set_property_string(dso, token1,v[i]);
}

So after this change it finds the dataset.url and proceeds. But there was one more problem. It wants to call ie:

ie = function (e) {
return e.offsetWidth;
};

Where e is an element, this.el.

So it expects the broad height and width properties to exist on elements. Does it make any sense for an element to have those? Anyway, could we throw them on c.prototype?

c.prototype.clientHeight = 768;
c.prototype.clientWidth = 1024;
c.prototype.offsetHeight = 768;
c.prototype.offsetWidth = 1024;
c.prototype.scrollHeight = 768;
c.prototype.scrollWidth = 1024;
c.prototype.scrollTop = 0;
c.prototype.scrollLeft = 0;

I used everything on this!  breakpoints, snapshotting, uvw trace etc


thanks
Kevin


Reply via email to