Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Runtime created elements (button) do not processed (from Dart) #96

Open
VladimirCores opened this issue Jun 13, 2020 · 3 comments
Open

Comments

@VladimirCores
Copy link

Expected Behavior

Runtime added buttons show correct styling

Actual Behavior

Runtime created buttons stay the same as default browser <button ...>

Reproduce Scenario (including but not limited to)

Repo: https://github.com/DQvsRA/Wire
Example: Counter (web)
See: example/counter/web/components/counter_button.dart

Steps to Reproduce

  1. Clone repo
  2. Open in IntelliJ IDEA
  3. Create build configuration - Dart Web
  4. Add path to example/counter/index.html
  5. Debug

Browser name/version/os (ie Chrome Version 62.0.3202.94 (Official Build) (64-bit) MacOS)

Any browser

Coral Spectrum version

I use: https://opensource.adobe.com/coral-spectrum/dist/playground/dist/css/coral.css

Sample Code that illustrates the problem (use the Playground if possible)

It works in playground with JS: https://opensource.adobe.com/coral-spectrum/dist/playground/#?livereload=true&screen=vertical&code=MTczLDE0Niw2MSw3OSw0LDMzLDE2LDEzNCwyMzUsMjE5LDk1LDEyOSw4OCwyMzYsMTUzLDIzMiwyMTAsMjcsMTE4LDE5LDE5MSwxMCwxMSw2MywxOCwxMDksNDQsODksMjQsMTExLDgxLDE0LDg2LDEwMiwyNDYsMjQ0LDI1MiwyNDUsMTk0LDIyNSwyNDksMTcsMTQxLDE0OSwyMTMsNDgsMjA0LDE5NSw1OSwyNDMsMiwxMTQsMjMxLDI0NCwyMzQsMjI4LDI0NiwyMzgsMjUwLDE0MCwxMywxODAsMTE2LDkzLDM3LDE4MywxLDE0OCwyMzMsNDIsMTk4LDE2NCwxNzksMjU0LDE0NSw2OSwxMTIsNDUsNzEsOTAsNTksMTkyLDEsMTI4LDU2LDI3LDM0LDIyMCwxODMsMTI0LDMyLDI2LDI0MSw4MCwxMzYsNDgsMTMwLDE5OSw0OCw2OSwxMywxNDEsN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LDE5MCwyMDUsMTc1LDExOCwxNTgsMzgsMTM2LDIzNSwyNywxMTIsMjMzLDE0OSw2NywxNTYsMjE1LDE4NywxODUsMTU4LDIxNywyOCwyNyw1MywxNjYsMTQzLDk3LDIzMCwxOTAsMjIzLDE3MSwxOTAsNjEsMjM4LDIzMCwxNSwxOTEsMQ==&

Screenshots (if applicable)

Screenshot 2020-06-13 at 17 34 03

@icaraps
Copy link
Contributor

icaraps commented Jun 15, 2020

@DQvsRA Please use document.createElement('button', {is: 'coral-button'}) to instantiate the button see document.createElement API and examples https://developer.mozilla.org/en-US/docs/Web/API/Document/createElement#Web_component_example

@VladimirCores
Copy link
Author

VladimirCores commented Jun 15, 2020

@icaraps in the attached Playground it works with later defining button properties, same as I do in the Dart example:

var nb = document.createElement('button')
nb.title = "New Button"
nb.innerText = "New Button"
nb.setAttribute('is', 'coral-button')
nb.setAttribute('variant', 'default')
nb.setAttribute('size', 'M')
var root = document.querySelector('#root')
root.append(nb)

@VladimirCores
Copy link
Author

I extracted example into separate branch - https://github.com/DQvsRA/Wire/tree/examples/counter-coral

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

No branches or pull requests

2 participants