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

implicit tags break updates #85

Open
wiresnips opened this issue Oct 6, 2017 · 0 comments
Open

implicit tags break updates #85

wiresnips opened this issue Oct 6, 2017 · 0 comments

Comments

@wiresnips
Copy link

The buildSelector function takes its cues directly from the request, but these do not always match the browser. For example, editing this file, using firefox 56:

<!DOCTYPE html>
<html>
  <head>
    <title>Skewer</title>
    <script src="/skewer"></script>
  </head>
  <body>
    <table>
      <tr>
	<td>one</td>
      </tr>
    </table>
  </body>
</html>

Trying to update "one", will fail with with TypeError: target is null. The problem is solved if I make the implicit tbody tag explicit, though.

<!DOCTYPE html>
<html>
  <head>
    <title>Skewer</title>
    <script src="/skewer"></script>
  </head>
  <body>
    <table>
      <tbody>
        <tr>
	  <td>two</td>
        </tr>
      </tbody>
    </table>
  </body>
</html>

This specific case seems simple (if not clean) to fix, by splicing ["tbody",1] into ancestry when there's a table that isn't followed by one of thead, tbody, or tfoot, when the browser is known to add the tag. The general case, though, is clearly bullshit. I don't know which browsers add which implicit tags under which conditions, and even if I did, keeping that list updated would be a nightmare.

Thoughts?

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

1 participant