chrome-extension_open-local-file-link icon indicating copy to clipboard operation
chrome-extension_open-local-file-link copied to clipboard

Target property

Open vlesieur opened this issue 7 years ago • 2 comments

Hi, it's again me. Target property is not taken into account. I try all theses links and they all act like "_blank" target property.

<!doctype html>
<head>
</head>
<html>
	<body>
		<ul>
			<li><a href="file://C:/Temp" target="_blank">_blank</a>
			<li><a href="file://C:/Temp" target="_self">_self</a>
			<li><a href="file://C:/Temp" target="_parent">_parent</a>
			<li><a href="file://C:/Temp" target="_top">_top</a>
			<li><a href="file://C:/Temp" target="framename">framename</a>
		</ul>
		<iframe id="framename" name="framename">
		</iframe>
	</body>
</html>

The last kind of target should load the directory view into the frame, as in IE :

image

But it is load in a new tab in Chrome with this extension, not in the frame :

image

The same thing happen when I create another page which is a frame of the first one and when i use _self target value.

vlesieur avatar Aug 08 '17 09:08 vlesieur

Target property is not taken into account. I try all theses links and they all act like "_blank" target property.

Yes, now this extension is made that way.

target="framename" But it is load in a new tab in Chrome with this extension, not in the frame

Chrome does not allow local files to be displayed as frames in http pages for security reasons. Even if you use Chrome extensions, it seems to be impossible to display them in frame.

tksugimoto avatar Aug 08 '17 15:08 tksugimoto

I am trying to find a solution.

For the _TOP target value, we can use this : chrome.tabs.update(baseTab.id, {url: localFileUrl});

For other target values based on frame, I do not find any solution.

Chrome does not allow local files to be displayed as frames in http pages for security reasons. Even if you use Chrome extensions, it seems to be impossible to display them in frame.

After a lot of tests, I have to agree with you ! Maybe there is a trick but I do not find it.

vlesieur avatar Aug 08 '17 15:08 vlesieur