Smart Button should keep a separate child node for text

RESOLVED WONTFIX

Status

RESOLVED WONTFIX
3 years ago
7 months ago

People

(Reporter: gandalf, Unassigned)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

(Reporter)

Description

3 years ago
Currently, smart button sets its text as a textContent on the <smart-button> element and when using localization, it sets the `data-l10n-id` attribute on the element.

This breaks when the code also tries to define a child element for an icon, because L20n does not allow external code to operate on the child node of a localizable node (with the exception of DOMOverlays).

So, instead of:

<smart-button data-l10n-id="foo">
  <div class="icon"></div>
</smart-button>

we should have:

<smart-button>
  <span data-l10n-id="foo"></span>
  <div class="icon"></div>
</smart-button>

Comment 1

7 months ago
Firefox OS is not being worked on
Status: NEW → RESOLVED
Last Resolved: 7 months ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.