serenity icon indicating copy to clipboard operation
serenity copied to clipboard

LibWeb: Add NodeFilter to window object

Open miller-time opened this issue 2 years ago • 6 comments

noticed that on certain pages, Ladybird and Browser both throw the error:

Unhandled JavaScript exception: [ReferenceError] 'NodeFilter' is not defined

MDN: https://developer.mozilla.org/en-US/docs/Web/API/Document/createNodeIterator w3: https://www.w3.org/TR/DOM-Level-2-Traversal-Range/traversal.html#Traversal-NodeFilter

Followed the AddNewIDL guide in the Serenity docs, to add the existing NodeFilter to the window object.

miller-time avatar Aug 06 '22 20:08 miller-time

/usr/bin/ld: CMakeFiles/LibWeb.dir/LibWeb/Bindings/NodeFilterWrapper.cpp.o: in function `Web::Bindings::wrap(JS::GlobalObject&, Web::DOM::NodeFilter&)':
/home/runner/work/serenity/serenity/Build/lagom/LibWeb/Bindings/NodeFilterWrapper.cpp:362: multiple definition of `Web::Bindings::wrap(JS::GlobalObject&, Web::DOM::NodeFilter&)'; CMakeFiles/LibWeb.dir/home/runner/work/serenity/serenity/Userland/Libraries/LibWeb/Bindings/NodeFilterWrapperFactory.cpp.o:/home/runner/work/serenity/serenity/Userland/Libraries/LibWeb/Bindings/NodeFilterWrapperFactory.cpp:14: first defined here

I don't understand this error. I can't find the second definition...

miller-time avatar Aug 07 '22 19:08 miller-time

ping @miller-time

linusg avatar Sep 20 '22 11:09 linusg

ping @miller-time

oh shoot, this slipped my mind! I will try to do the Realm update later today.

miller-time avatar Sep 20 '22 12:09 miller-time

Rebased and pushed but I'm guessing that the NodeFilterWrapperFactory should not be added because the section that talked about wrapper factories has been removed from AddNewIDLFile.md.

miller-time avatar Sep 21 '22 05:09 miller-time

That seems right, yeah :)

linusg avatar Sep 21 '22 15:09 linusg

This has conflicts again, for some refactors that I did this time :sweat_smile:

ADKaster avatar Oct 12 '22 04:10 ADKaster

This pull request has been automatically marked as stale because it has not had recent activity. It will be closed in 7 days if no further activity occurs. Thank you for your contributions!

stale[bot] avatar Nov 05 '22 05:11 stale[bot]

This pull request has been closed because it has not had recent activity. Feel free to re-open if you wish to still contribute these changes. Thank you for your contributions!

stale[bot] avatar Nov 12 '22 06:11 stale[bot]