GithubHelp home page GithubHelp logo

Comments (9)

astearns avatar astearns commented on July 17, 2024 1

The CSSWG will automatically accept this resolution one week from now if no objections are raised here. Anyone can add an emoji to this comment to express support. If you do not support this resolution, please add a new comment.

Proposed Resolution: Add an array of shadow roots to a dictionary which is an argument of the document.caretPositionFromPoint API as described in #10345 (comment)

from csswg-drafts.

siliu1 avatar siliu1 commented on July 17, 2024

@mfreed7 FYI I opened this issue to update the spec for document.caretPositionFromPoint to take a single array of shadow roots instead of using a rest parameter.

from csswg-drafts.

siliu1 avatar siliu1 commented on July 17, 2024

@annevk @zcorpan @smaug---- FYI.

from csswg-drafts.

annevk avatar annevk commented on July 17, 2024

Doesn't seem unreasonable, but it might be even better to make it a dictionary argument so we can add more arguments there in the future.

I probably wouldn't go as far as https://w3ctag.github.io/design-principles/#prefer-dictionaries and also make the mandatory arguments part of the dictionary as the surrounding methods don't match that pattern and "x, y" is pretty established, but for the third argument it seems like a good idea.

from csswg-drafts.

mfreed7 avatar mfreed7 commented on July 17, 2024

@mfreed7 FYI I opened this issue to update the spec for document.caretPositionFromPoint to take a single array of shadow roots instead of using a rest parameter.

+1. That aligns with getHTML() and also allows additional arguments to be added later.

Doesn't seem unreasonable, but it might be even better to make it a dictionary argument so we can add more arguments there in the future.

+1 to that also. It makes the name of that argument explicit, which is nice, and allows additional arguments in an even better way.

By the way, I think we should make the same change to getComposedRanges() for all of the same reasons.

from csswg-drafts.

siliu1 avatar siliu1 commented on July 17, 2024

Proposed solution: Put the array of shadow roots into a dictionary which is an argument of document.caretPositionFromPoint API.

document.caretPositionFromPoint(double x, double y, optional CaretPositionFromPointOptions options = {});

dictionary CaretPositionFromPointOptions {
  sequence<ShadowRoot> shadowRoots = [];
};

from csswg-drafts.

siliu1 avatar siliu1 commented on July 17, 2024

@mfreed7 FYI I opened this issue to update the spec for document.caretPositionFromPoint to take a single array of shadow roots instead of using a rest parameter.

+1. That aligns with getHTML() and also allows additional arguments to be added later.

Doesn't seem unreasonable, but it might be even better to make it a dictionary argument so we can add more arguments there in the future.

+1 to that also. It makes the name of that argument explicit, which is nice, and allows additional arguments in an even better way.

By the way, I think we should make the same change to getComposedRanges() for all of the same reasons.

Filed w3c/selection-api#176

from csswg-drafts.

siliu1 avatar siliu1 commented on July 17, 2024

Proposed solution: Put the array of shadow roots into a dictionary which is an argument of document.caretPositionFromPoint API.

document.caretPositionFromPoint(double x, double y, optional CaretPositionFromPointOptions options = {});

dictionary CaretPositionFromPointOptions {
  sequence<ShadowRoot> shadowRoots = [];
};

@astearns Can we get to resolution of this issue asynchronously with the proposed solution? Thanks!

from csswg-drafts.

astearns avatar astearns commented on July 17, 2024

RESOLVED: Add an array of shadow roots to a dictionary which is an argument of the document.caretPositionFromPoint API as described in #10345 (comment)

from csswg-drafts.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.