cs-au-dk / jalangilogger

Other
2 stars 4 forks source link

Untransformed event-handler: 'js-url-0.js' #6

Open esbena opened 7 years ago

esbena commented 7 years ago

The LogFileTransformer needs to make href-attribute (or the more general javascript:) event handlers be logged with a properly transformed source location.

See example in chromeExperiments/bomomo.html:

<a href="javascript:saveCanvas()" class="toolbarButton" id="toolbarButtonSave" title=""><img src="./bomomo_files/save.png" alt=""></a>

Log:

{"name":{"valueKind":"concrete-string","value":"saveCanvas"},"sourceLocation":{"fileName":"js-url-0_orig_.js","columnNumber":"1","lineNumber":"1"},"value":{"valueKind":"abstract-object","value":{"objectKind":"allocation-site","allocationSite":{"fileName":"bomomo.html","columnNumber":1,"lineNumber":450}}},"entryKind":"read-variable"}

Problem: The {"fileName":"js-url-0_orig_.js","columnNumber":"1","lineNumber":"1"} should be the inlined HTML source position: bomomo.html:2848:29 instead.

@barslev can you take a look? It should be similar to the other transformations that are already being done.