Skip to content

Allow html attributes#180

Merged
rwjblue merged 1 commit intoember-fastboot:masterfrom
SergeAstapov:html-attributes
May 27, 2018
Merged

Allow html attributes#180
rwjblue merged 1 commit intoember-fastboot:masterfrom
SergeAstapov:html-attributes

Conversation

@SergeAstapov
Copy link
Contributor

The SimpleDOM document that gets created during fastboot rendering has a html tag, and it's possible to set attributes on it. For example, assuming getDOM from ember-wormhole:

Component.extend({
  init() {
    this._super(..arguments);
    getDOM(this).documentElement.setAttribute('data-foo', 'hello')
  }
})

But this doesn't actually cause any output in fastboot, because the user's own tag from index.html is always used instead.

This PR allows attributes set on the SimpleDOM html to be copied into the output.

Credit to @ef4 for inspirational PR #171.

Closes ember-fastboot/ember-cli-fastboot#331

@SergeAstapov
Copy link
Contributor Author

Hi @kratiahuja! Do you mind to take a look once get a chance? Do you feel this is right way to approach the problem?

@bobisjan
Copy link
Contributor

This would be a great addition for using lang attribute on HTML element 👍.

@rwjblue rwjblue merged commit b684123 into ember-fastboot:master May 27, 2018
@rwjblue
Copy link
Member

rwjblue commented May 27, 2018

Sorry for the delay here! Merged and released as 1.2.0...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants