Opened 4 years ago

Closed 3 years ago

#3591 closed change (rejected)

Support <template> on Safari <7 and Edge for new options page

Reported by: greiner Assignee:
Priority: P2 Milestone:
Module: User-Interface Keywords: 2016q1
Cc: sebastian, oleksandr Blocked By:
Blocking: #2706 Platform: Edge
Ready: yes Confidential: no
Tester: Unknown Verified working: no
Review URL(s):

Description (last modified by sebastian)

Background

We're using <template> elements in various places in the new options page. Safari <7 and Edge doesn't support those, however. So we need to work around that limitation.

What to change

  • Hide <template> tags by default
  • Implement HTMLUnknownElement.content using DocumentFragment to polyfill HTMLTemplateElement.content

Change History (9)

comment:1 Changed 3 years ago by greiner

  • Blocking 2706 added

comment:2 Changed 3 years ago by sebastian

  • Description modified (diff)
  • Keywords edge added
  • Platform changed from Safari to Unknown / Cross platform
  • Summary changed from Support <template> on Safari 6.1-7.0 for new options page to Support <template> on Safari <7 and Edge for new options page

comment:3 follow-up: Changed 3 years ago by oleksandr

comment:4 Changed 3 years ago by oleksandr

  • Cc oleksandr added

comment:5 in reply to: ↑ 3 ; follow-up: Changed 3 years ago by greiner

Replying to oleksandr:

<template> on Edge seems to be supported: https://dev.windows.com/en-us/microsoft-edge/platform/status/templateelement

That'd explain why window.HTMLTemplateElement is not defined in Edge 20.10240 (the one I tested) but not why <template>.content is also undefined. Any idea why that might be the case?

comment:6 Changed 3 years ago by sebastian

After all, it shouldn't matter much, as we need that polyfill for Safari anyway. And instead for a particular browser and it's version, we should rather check for presence of HTMLTemplateElement.content anyway.

comment:7 in reply to: ↑ 5 Changed 3 years ago by oleksandr

Replying to greiner:

That'd explain why window.HTMLTemplateElement is not defined in Edge 20.10240 (the one I tested) but not why <template>.content is also undefined. Any idea why that might be the case?

Both window.HTMLTemplateElement and document.createElement('template').content are defined starting from EdgeHTML 13 (November 2015). I've just checked, but it is also stated here

Note: referencing the Edge app version is advised against, since it is the underlying engine (EdgeHTML) that's important here.

comment:8 Changed 3 years ago by sebastian

  • Keywords edge removed
  • Platform changed from Unknown / Cross platform to Edge

comment:9 Changed 3 years ago by sebastian

  • Resolution set to rejected
  • Status changed from new to closed

With the traditional Adblock Plus Safari extension being phased out in favor of a native app, and Microsoft Edge seeming to support <template> natively meanwhile, this became unnecessary.

Note: See TracTickets for help on using tickets.