href DOM property is empty for relative URLs of anchor elements inside TEMPLATE element content
Reported by
woxxom@gmail.com,
Apr 19 2017
|
||||
Issue descriptionUserAgent: 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 .
,
Apr 20 2017
Confirmed. This is a <template>-specific bug. This doesn't happen with a normal DocumentFragment.
,
Apr 24 2017
,
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".
,
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.
,
Apr 26 2017
As per discussion on https://codereview.chromium.org/2837823004/ , marking this bug as WontFix
,
Apr 26 2017
|
||||
►
Sign in to add a comment |
||||
Comment 1 by tkent@chromium.org
, Apr 19 2017Labels: Hotlist-Interop