Closed Bug 1091892 Opened 10 years ago Closed 7 years ago

Update lib/sdk/stylesheet/utils.js to accept string inputs

Categories

(Add-on SDK Graveyard :: General, defect, P2)

x86
macOS
defect

Tracking

(Not tracked)

RESOLVED INCOMPLETE

People

(Reporter: evold, Unassigned)

Details

Attachments

(1 file)

I think the goal here is to update lib/sdk/stylesheet/utils.js to accept string inputs. https://github.com/mozilla/addon-sdk/pull/1507
Comment on attachment 8514597 [details] [review] Link to Github pull-request: https://github.com/mozilla/addon-sdk/pull/1507 I can review this one actually.
Attachment #8514597 - Flags: review?(rFobic) → review-
I'm not sure what's the purpose is, but assuming you want to convert a CSS file in a data URI, it will break all the relative paths inside, and that's a no go for us. If the reason to do so, it's e10s, then the bug 1090135 should takes care of that. If the reason is, instead, loading a CSS strings instead of having a physical file, and there is no relative URL, I'll suggest either to do the conversion before passing the URL to the method – and not inside – or using the Style object, to passing source strings, and using attach method to apply the styles to a specific window: const { Style } = require('sdk/stylesheet/style'); const { attach } = require('sdk/content/mod'); let style = Style({ source: 'div { border: 1px solid red }' }); attach(style, myWindow); Where myWindow is a reference to a window object.
Priority: -- → P2
Attachment #8514597 - Flags: review- → review?
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → INCOMPLETE
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: