New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 713012 link

Starred by 2 users

Issue metadata

Status: WontFix
Owner:
Last visit > 30 days ago
Closed: Apr 2017
Components:
EstimatedDays: ----
NextAction: ----
OS: Windows
Pri: 2
Type: Bug



Sign in to add a comment

href DOM property is empty for relative URLs of anchor elements inside TEMPLATE element content

Reported by woxxom@gmail.com, Apr 19 2017

Issue description

UserAgent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/57.0.2987.133 Safari/537.36

Steps to reproduce the problem:
1. open https://jsfiddle.net/c689LL32/1/
2. look at the bottom right frame

What is the expected behavior?
Actual .href value is displayed e.g. .href: https://fiddle.jshell.net/_display/SUCCESS

What went wrong?
".href: FAILED" is displayed

Did this work before? No 

Chrome version: 57.0.2987.133  Channel: stable
OS Version: 6.1 (Windows 7, Windows Server 2008 R2)
Flash Version: Shockwave Flash 25.0 r0

A. Firefox is working correctly

B. The TEMPLATE element's .content is a DocumentFragment which naturally doesn't have an URL of its own so Chrome should use the active document's URL similarly to the recently fixed DOMParser  issue 698128 .
 

Comment 1 by tkent@chromium.org, Apr 19 2017

Components: -Blink Blink>HTML
Labels: Hotlist-Interop

Comment 2 by tkent@chromium.org, Apr 20 2017

Status: Available (was: Unconfirmed)
Confirmed.  This is a <template>-specific bug. This doesn't happen with a normal DocumentFragment.

Owner: shanmug...@samsung.com
Status: Assigned (was: Available)

Comment 4 by foolip@chromium.org, Apr 25 2017

There's a review up at https://codereview.chromium.org/2837823004/ and I'm skeptical that that Firefox is correct here. The relevant bit of spec:

https://html.spec.whatwg.org/multipage/scripting.html#template-contents
https://html.spec.whatwg.org/multipage/scripting.html#appropriate-template-contents-owner-document

AFAICT, there's nothing that sets that document's URL, so it should be "about:blank".

Comment 5 by woxxom@gmail.com, Apr 25 2017

The spec might be incomplete. No one has probably thought about this particular use case. Currently, the relative href value is silently lost which seems weird/wrong.
As per discussion on https://codereview.chromium.org/2837823004/ , marking this bug as WontFix
Status: WontFix (was: Assigned)

Sign in to add a comment