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

Omits readonly attributes from SSR code #2877

Merged

Conversation

colincasey
Copy link
Contributor

Fixes #2339 by:

  • moving is_readonly into the common Binding AST class
  • preventing the following bindings from being emitted into the SSR code:
    • bind:clientWidth
    • bind:clientHeight
    • bind:offsetWidth
    • bind:offsetHeight
    • bind:duration
    • bind:buffered
    • bind:seekable
    • bind:played
    • bind:value (only for input with type=file)

* move `is_readonly` into the common `Binding` AST class
* prevents the following bindings from being emitted into the SSR code:
  * `bind:clientWidth`
  * `bind:clientHeight`
  * `bind:offsetWidth`
  * `bind:offsetHeight`
  * `bind:duration`
  * `bind:buffered`
  * `bind:seekable`
  * `bind:played`
  * `bind:value` (only for  `input` with `type=file`)
@Rich-Harris Rich-Harris merged commit a7d4fe1 into sveltejs:master May 27, 2019
@Rich-Harris
Copy link
Member

excellent, thank you

@colincasey colincasey deleted the feat/omit_readonly_ssr_bindings branch May 27, 2019 12:23
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.

bind:clientWidth shows up in SSR
2 participants