rendrjs / rendr

Render your Backbone.js apps on the client and the server, using Node.js.
MIT License
4.09k stars 312 forks source link

Explicitly check for data-pass-thru to be true #515

Closed mattpardee closed 8 years ago

mattpardee commented 8 years ago

At least in the way we've been using it, we always set data-pass-thru="true" when we mean it. This seemed to indicate that if data-pass-thru was set to "false" it would catch links clicked to be handled by the Rendr app - not the case. This change makes it explicit that data-pass-thru="true" means Rendr won't be handling the link.

@saponifi3d @jmerrifield

coveralls commented 8 years ago

Coverage Status

Coverage remained the same at 86.054% when pulling e547827ecb5cbb0707ee031b606e55f111dd84cc on mattpardee:explicit-check-data-pass-thru into 48560e1ca1ad72c94c9c68fb9cfba3259163536e on rendrjs:master.

saponifi3d commented 8 years ago

The data-pass-thru="true" is a pattern I setup for clarity in the codebase, as most people were confused about just having an empty data-pass-thru attribute. The intent here is not to check for equality, especially just string equality.

If you wanted to add to this, you should have it grab the data-pass-thru attribute and do some validation checking on the attribute itself, rather than enforcing a string convention where not everyone is beholden to, that would also make this a non-breaking change.

🔒

mattpardee commented 8 years ago

Miss youuuu <3