In this answer https://stackoverflow.com/a/14199051/3195031

the construction

$('a').click(function (e) {
        e.preventDefault();
        SearchApp.navigate(e.target.pathname, true);
      });

was used

Particulaly, this object "e.target.pathname"

I tried to find some docs for javascript event, where property pathname is described, but failed. Maybe somebody can provide a link fo one?

有帮助吗?

解决方案

e.target - is dom object, and in that case its <a></a> object. By w3c specs a tag implements location interface. So that is the answer where you getting it. http://dev.w3.org/html5/markup/a.html#a-interface - for example where you can read it.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top